Count of records in a subform

  • Thread starter Thread starter Max Moor
  • Start date Start date
M

Max Moor

Hi All,
I have a subform displaying a bunch of records, and I want to display
how many there are. Saying:

fsubName.Count

doesn't work. I've also tried:

fsubName.Form.Count

but it returns the number of controls on the subform. (I think I know
why... maybe) How do I get at the number of records?
 
If you are trying to get this from the main form

Me.NameOfSubformControl.Form.Recordset.RecordCount

The NameOfSubformControl is the name of the control on the main form that holds the
subform, NOT the name of the subform (although, they may be the same if you just dragged
and dropped the subform onto the main form). To get the name of the subform control, open
the main form in design mode. Open the Properties sheet, then click on the subform ONE
time. The properties sheet should show the name of the subform control. If you click on
the subform a second time, you will be in the subform and the Properties sheet will show
the form's name, not the name of the control holding the form.
 
Back
Top