displaying dialogue box when no records

ajaymansata

Registered User.
Local time
Today, 22:24
Joined
Dec 17, 2001
Messages
25
Hi all
Well Actually i have a problem
What I have is a search form.
When i enter lastname i have fired a query which retrieves records corresponding to that last name.Then i am using a form to display results of the query.
However what i want is that when no records are present i should display
NO Records present.Could anyone tell me how can i do this.
Also is it possible to open a HTML file if there are no records existing for a particualr query.If yes How?
Ajay Mansata
 
You could do:

If DCount ("*","QueryName") = 0 Then
MsgBox "There are no records"
Exit Sub
End IF

Put that prior to the code that gets the record information and change "QueryName" to the name of the query that filters the records that you want to view.
 

Users who are viewing this thread

Back
Top Bottom