I have designed a form that allows a user to generate a report and use various criteria to filter that report. The report has a pre-designed SQL statement for a recordsource (some of these already require a "WHERE" clause in the SQL string). Based on the drop-down selections, I create a string called "strFilter" and place that in the DoCmd.OpenReport(strReportName,acViewPreview,,strFilter).
Everything works fine until there are no records left after the filter is applied. I need a way to count the records after applying the filter so that I can interject with a Message Box if there are no records to display on the report.
Any ideas? Thanks!
Everything works fine until there are no records left after the filter is applied. I need a way to count the records after applying the filter so that I can interject with a Message Box if there are no records to display on the report.
Any ideas? Thanks!