Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine if report contains data before printing using VBA 1

Status
Not open for further replies.

vamoose

Programmer
Oct 16, 2005
320
MX
I am using Access 2000. I have 1 table of data and 5 queries which generate the 5 reports which could possibly come from this table. My question is how do I determine using VBA which report has data within it and which ones are empty. The reports are all printed at once upon the click of a single button. The problem is that if a report contains no data the VBA breaks. The basis of the report is based on Machine Number as in 3, 5, 13, 76 or 83. Thank you for any suggestions.
 
You can cancel the report using the OnNoData event. I believe that was in ac2K. Will that work for you?

HTH RuralGuy (RG for short) acXP winXP Pro
Please respond to this forum so all may benefit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top