472,142 Members | 1,229 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

Report Error when no records meet query criteria

I have some reports whose purpose is to show whether any records currently meet certain criteria, so of course the report is based on a query where that criteria is defined. If there don't happen to be any records that satisfy the criteria at a particular time then the report produces with one line in the detail section that says "#Error". This confuses the users becuase they think there is something wrong with the report. Is there a way to suppress this, or even make it say something meaningful, like "No records currently meet this criteria."
Aug 27 '07 #1
1 1768
1,206 Expert 1GB
There is an event for just this case. Reports all have a "No Data" event. You could add code under this event to display a message box to the user or even cancel the opening of the report. Have a look at the help files for a more detailed explanation and an example.
Aug 28 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Nathan Bloomfield | last post: by
3 posts views Thread by Richard Hollenbeck | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.