Preventing empty reports from printing

  • Thread starter Thread starter Chuckwny
  • Start date Start date
C

Chuckwny

I have a button that runs a macro that prints out 5
reports. My problem is that 2 or 3 of these reports are
usually empty. Is there a way to check if a report is
empty before printing?

Thanks

Chuck
 
Reports have a "no data" event that allow you cancel opening the report and
display a message (or indeed do anything else). eg this will show a message
saying "No data to display" and will prevent the report from opening:

Private Sub Report_NoData(Cancel As Integer)
msgbox "No data to display"
Cancel = True
End Sub
 
Back
Top