No Data event for reports

B

b_lwalker

One of the reports in my db can be opened with no data (filtered by
date, date selected by user). When this happens I would like to
display a message box to this effect and close the report.

However, due to formatting/ordering requirements I need to open the
reports in preview, and for some reason the No Data event executes 4
times on opening - and this prevents me from closing the report.
Any ideas on how to get around this?

Cheers,

Bruce Walker
 
A

Allen Browne

If you cancel the NoData event the report does not open.

If you used the OpenReport action to open the report, you macro will then
give another error message. If you used the OpenReport method in code, you
can trap this error (2501) so it does not bother the user.

The NoData event should not fire multiple times.
 
Top