I have a function built to send a report to a specific department based on a table.
Example:
DoCmd.SendObject acReport, "Report #1", "PDFFormat(*.pdf)", DLookup("[Table Field]", "Table", "Criteria = 'Department 1'')...
DoCmd.SendObject acReport, "Report #2", "PDFFormat(*.pdf)", DLookup("[Table Field]", "Table", "Criteria = 'Department 2'')...
DoCmd.SendObject acReport, "Report #3", "PDFFormat(*.pdf)", DLookup("[Table Field]", "Table", "Criteria = 'Department 3'')...
The problem I have is the reports are conditioned to not produce if no results are found, using the 'on no data' event. If the report is not produced the function stops running there. How can I either bypass this error or reconfigure to exclude blank reports another way?