Dynamic subdatasheets?

G

Guest

I would like to be able to dynamically add/remove subdatasheets (through VBA)
when the user expands the record in the main query depending on the contents
of the record expanded. In other words, expanding one parent record would
result in one subdatasheet being shown, but a parent record with different
contents would result in another. I presume this means capturing some
"expand" event and removing / adding the applicable subdtasheets on the fly.

Problem is I don't see an event that captures the act of expanding records
on the main (parent) query. Any suggestions?
 
J

John Vinson

Any suggestions?

Yes. Don't use datasheets or subdatasheets at all.

Instead use a Form with a Subform, and use the form's Current event to
dynamically change the Recordsource (or the Source Object, more
likely) of the subform.

Forms have a rich event model, and allow this kind of intervention.
Datasheets don't. If you like the appearance of the datasheet, you can
get partway there using a Continuous Form made up to look like a
datasheet.

John W. Vinson[MVP]
 
G

Guest

Thanks, I'll give it a try. I may be back with other questions as I get into
implementation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top