OnNoData for Forms?

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

I've created a form that acts as a search form. I also
have a command button on that form that opens a filtered
form based upon the search criteria.

If there are no results I would like a message box to
appear and and say something like "There are no records
that match your search."

I know the msgbox functions, and I know reports have
OnNoData events, but how can I accomplish this with a
form??


I am thinking of "RecordCount" I am thinking there is a
property like that I can use.

Any Ideas? Thanks so much in advance.
Don
 
Private Sub Form_Load(Cancel as Integer)
If Me.RecordsetClone.EOF Then
MsgBox "No Data"
Cancel = True
End If
End Sub


Chris
 
Back
Top