Stop Empty Reports From Printing?!

DeanRowe

Registered User.
Local time
Today, 23:11
Joined
Jan 26, 2007
Messages
142
Hi,

I have 7 different queries – each query has its own report. I have a macro set to print all 7 reports, however sometimes some of the queries do not return any data and I end up printing out lots of blank reports.

It’s a complete waste of paper as I do this 10/15 times a day and I’d like the report not to print if the query doesn't return any data.

For example:
Query 1 – returned no information – don’t print Report 1.
Query 2 – returned information – Print report 2
Query 3 – returned information – Print report 3
Query 4 – returned no information – don’t print Report 4
Query 5 – returned no information – don’t print Report 5
Query 6 – returned information – Print report 6
Query 7 – returned information – Print Report 7

Does anyone know how I can go about this? I know there will be a quite basic setting but I can’t find it.

Thank you for your time.
 
Have you considered using the OnNoData event of the report or checking for an empty recordset in the Open event of the report and simply canceling the report?
 
Thank you again Rural Guy, I googled the On NoData Event and built a macro with a CancelEvent action. i had come across it before but i had read somewhere that the CancelEvent action would stop the print process entirely, so if the first report was cancelled it wouldn't print any of the following, but it worked a treat and all the correct reports print.

thank you once again Rural Guy.
 

Users who are viewing this thread

Back
Top Bottom