OnNoData for my form

  • Thread starter Thread starter Bonnie
  • Start date Start date
B

Bonnie

Hi there. Using A02 on XP. Love the OnNoData Event for
reports. But, I have a form that I would like to show a
message when there are no records and cancel the form open
event. Otherwise, go ahead and open. How is it best to do
this? Thanks in advance for any help or advice.
 
Hi there. Using A02 on XP. Love the OnNoData Event for
reports. But, I have a form that I would like to show a
message when there are no records and cancel the form open
event. Otherwise, go ahead and open. How is it best to do
this? Thanks in advance for any help or advice.

In the form's Open event:

If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "No Records"
Cancel = True
End If
 
Excellent! Thanks SSOOOOOOO much!
-----Original Message-----


In the form's Open event:

If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "No Records"
Cancel = True
End If

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Back
Top