Detecting When A Subform Has No Records

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

When a main form goes to a different record, how do you detect that the subform
has no records?

Thanks!

Mark
 
One way is to check the RecordCount of the RecordsetClone:

If Me.Subform.Form.RecordsetClone.RecordCount = 0 Then
MsgBox "The Subform has no records."
End If

Subform in the above expression is the name of the subform control that
holds the subform object.
 
Comments: This message did not originate from the Sender address above.
It was remailed automatically by anonymizing remailer software.

Please ignore this posting.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
X-No-Archive: Yes


Obviously, this is an impersonation of Tony Toews, posted from the
semi-anonymous teranews server with a freebie return address, a combination
known to be used by Don P Mellon.
 
Back
Top