Detecting When A Subform Has No Records

M

Mark

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

Thanks!

Mark
 
K

Ken Snell

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.
 
T

Tony Toews

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
 
L

Larry Linson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top