You can optionally include another line of code to cancel the opening of the
form...
MsgBox "No data"
Cancel = True
....however if the report is being opened via code (like from a button press)
then that calling code will interpret the cancel as an error. The number of
that error (2501) will need to be trapped for and ignored.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.