Blank form when no data returned

Stacey

Registered User.
Local time
Today, 08:31
Joined
Sep 10, 2002
Messages
84
I have a form opened from another form, filtered by a query with the criteria of a value in a field on the first form. If there is no data brought back by the query, the form opens with just the header label, no other fields.

How can I have a message display that no data was returned instead of just a blank form? I have look at the properties for forms and there isn't an On No Data option for forms. I can't find how to have the query trigger something for no data either.
 
You could test before opening the form:

If DCount("*", "QueryName") > 0 Then
 
That worked beautifully. Thank you!
 
No problem, Stacey.
 

Users who are viewing this thread

Back
Top Bottom