Repost: Avoid opening blank report when no data

A

Amit

Windows XP, MS Access 2K
====================
Hi,

I'd posted a question here last week:

http://support.microsoft.com/newsgr...75b2adc68568&lang=en&cr=US&sloc=en-us&m=1&p=1

which I'm still struggling to solve. Basically, when I open a report from a
form when there is no data, the report opens with a blank page instead of
displaying the "No data" message and not opening the report. I DO have the
code in the "No Data" event of the report, but still the report opens with a
blank page.

Will appreciate if someone can point me in the right direction.

Thanks!

-Amit
 
F

fredg

Windows XP, MS Access 2K
====================
Hi,

I'd posted a question here last week:

http://support.microsoft.com/newsgr...75b2adc68568&lang=en&cr=US&sloc=en-us&m=1&p=1

which I'm still struggling to solve. Basically, when I open a report from a
form when there is no data, the report opens with a blank page instead of
displaying the "No data" message and not opening the report. I DO have the
code in the "No Data" event of the report, but still the report opens with a
blank page.

Will appreciate if someone can point me in the right direction.

Thanks!

-Amit

Why didn't you include the OnNoData code here?
 
A

Amit

Oh, sorry about that.
Here's the code in the No Data event of the report:
=======================
Msgbox "No data to display."
Cancel=True
=======================

-Amit
 

Ask a Question

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.

Ask a Question

Top