Dcount on filtered records

D

DubboPete

Hi all,

I am trying to stop a report opening if there are no records to print.

My filter is as follows:

SELECT TblDisposals.*, TblDisposals.PrintFlag FROM TblDisposals WHERE
(((TblDisposals.PrintFlag)=0));

It comes up with a blank report. So far so good. What I want to do
is stop the report opening in the first place if there are no records
to print, and replace that action with a message box.

Any clues as to what to put in the report Event On Open?

cheers
DubboPete
17th Century Goat-Herder
 
D

DubboPete

Thanks John, it works very well - not surprising I didn't spot that "On
No Data" event eh?

cheers mate

Pete
 
J

John Vinson

Thanks John, it works very well - not surprising I didn't spot that "On
No Data" event eh?

I didn't either, until someone here pointed it out... DUH!! <g>

John W. Vinson[MVP]
 

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