No Records Msg

Irie

Registered User.
Local time
Today, 14:01
Joined
Jul 12, 2001
Messages
27
I have a continuous form based on a parameter query. The user enters the criteria, and then the records that match the criteria are displayed in the continuous form.
My problem is if the there are no records found, how do I get a msg box to say "No records found"?

I have tried various techniques displayed in the archives of this forum, but have found nothing that works.

Any help would be appreciated.
THnx

FYI:

Continuous form is called: renewalform
query is called: renewalsearch




[This message has been edited by Irie (edited 07-13-2001).]
 
If DCount("*", "renewalsearch","[CriteriaField] = " & Me.FieldOnFormWithCriteria)<= 0 Then
MsgBox "No data to return"
Else
Open your continuous form
End if

The above assumes the criteria is numeric. Replace the CriteriaField with the appropriate field in the query.

[This message has been edited by Jack Cowley (edited 07-13-2001).]
 

Users who are viewing this thread

Back
Top Bottom