Check subform for records

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

Guest

Is there a function that returns the number of records in a subform? I would
like to call it from a command button on click procedure on the main form. I
actually don't need the number, just a boolean as to whether there are any or
not.

Thanks to all thoughtful responses.
Sprinks
 
Thanks, Allen.

Allen Browne said:
Try:

If Me.[NameOfYourSubformControlHere].Form.RecordsetClone.RecordCount > 0
Then

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Sprinks said:
Is there a function that returns the number of records in a subform? I
would
like to call it from a command button on click procedure on the main form.
I
actually don't need the number, just a boolean as to whether there are any
or
not.

Thanks to all thoughtful responses.
Sprinks
 
Back
Top