I have a database in Access 2000. The people useing it will occasionaly run a report which has no data. Is there a way for the database to recognize that and put up a MsgBox instead of displaying the report with the #Error message?
You could create a Macro, such as NoData. In the first Action row, select MsgBox. Set the bottom parameters with your message.
In the second Action Row, select the CancelEvent.
Save the Macro.
Open your report in design view, select the Report (top left corner is a little grey square. Click in it and a black square should appear). Bring up the property sheet for the report. Click the Event tab, click the line next to On No Data. Click the dropdown arrow and select your Macro (NoData)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.