How to check No data is report

  • Thread starter Thread starter Mei Qin
  • Start date Start date
M

Mei Qin

Hello,

In my report, Detail.format event, I write code to display
a field based on the value of another field. But if the
query the report based on returns no data, it gave me
error when I open the report. How do I check if the report
have any data?

Thanks for any help!
 
Hello,

In my report, Detail.format event, I write code to display
a field based on the value of another field. But if the
query the report based on returns no data, it gave me
error when I open the report. How do I check if the report
have any data?

Thanks for any help!

In the Report's OnNoData event

MsgBox "No data today."
Cancel = True

You'll get a message, and the report will NOT run.
 
Back
Top