No records displayed by form

MadCat

Registered User.
Local time
Today, 14:04
Joined
Jun 24, 2003
Messages
62
Hi all

i have a form on which there is a text box which takes in a value. on entering the value the user then clicks on a button which opens another form whose recordsource is the result of a query which takes the previously entered value. i was wondering if there is a way to bring up a message box letting the user know that there are no returned values when the query returns nothing. at present the form is set to go to the last record when it opens and when there are no returned records an error message is displayed saying that the user cannot go to the specified record.

Any help is much appreciated

Thanks in advance
 
Form_Load
If RecordsetClone.RecordCount =0 Then
MsgBox "There are no records to display"
DoCmd.Close
End If
End sub
 
Thanks Rich

I had just spotted the recordcount option just before you replied.

Cheers and thanks for your help
 

Users who are viewing this thread

Back
Top Bottom