Subforms display data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have several subforms within a main form. Some of the personnel have info
within these subforms. SOme don't. Is it possible to have the subforms show
only when there is data in the subform. ANd, when no data the subform
doesn't display?

Thanks
 
I have several subforms within a main form. Some of the personnel have info
within these subforms. SOme don't. Is it possible to have the subforms show
only when there is data in the subform. ANd, when no data the subform
doesn't display?

Thanks

It's possible but it will be slow and require a bit of code. What you
would need to do in the Form's Current event is to use DCount() to
count the records in each related table; if the count is zero set that
table's Subform control's Visible property to False.

Note that if this is a data entry form, you'ld be making it impossible
to add data to the subform in the first place.

John W. Vinson[MVP]
 
Back
Top