Altering an empty report.

Roni Sutton

Registered User.
Local time
Today, 23:47
Joined
Oct 18, 1999
Messages
68
I have created a report based on a query. Occasionally, the query will have no data. Should this happen, I do not want the report to pring the usual 'ERROR#'. Instead, I want it to say, 'there is no data for this report'. I have tried doing a recordset check in VBA in the on open of the report, but am getting a weird error message in my vba code (which I posted on the VBA forum). Does anyone have any ideas how to force a report to print a blank version of itself rather than the word 'ERROR#' in each field if the query contains no data? If I can get that far, I can make it work.

Roni
 
Check out the On No Data event of the Reports Property sheet... Place the cursor in the event and press F1 for details. You can also use code like:

If DCount("*","QueryName")<1 Then
rest of your code here..
End if

HTH,
Jack

[This message has been edited by Jack Cowley (edited 08-31-2000).]
 

Users who are viewing this thread

Back
Top Bottom