Cancel the printing of a report when it doesn't contain any records

Cancel the printing of a report when it doesn't contain any records

  1. Open the report in Design view.

  2. Double-click the report selector to display the report's property sheet.

  3. Set the OnNoData property to [Event Procedure] or to the name of a macro that cancels previewing or printing the report.

Note   The Employee Sales by Country report in the Northwind sample database uses an event procedure in the OnNoData property. To view this report, open the Northwind database in the Samples subfolder of your Office folder, and then open the Employee Sales by Country report in Design view. For information on opening Northwind, click .