I have created a macro that will open six reports based on criteria selected by a form. How do I make it if there is no data in the report to not open or print? Thank you in advance.
In the OnNoData event of the report put Cancel=True
In your code that opens the report make sure you have error handling to capture error 2501. If you are opening 6 reports you may want to use something like If err.num = 2501 then resume next end if