Dynamic subdatasheets?

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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]
 
Thanks, I'll give it a try. I may be back with other questions as I get into
implementation.
 
Back
Top