Sorry I should have been more specific.
There are two additional text boxes on the form(dialog box)prompting for start and end dates. Quite often the report will return no records for the search, but when it does the report and page header appear along with #error where the count should be.
The expression to count the records is on the report in a text box, =Count(*) together with leading and trailing text.
Management require a nill report to be produced if there are no records.
The primary key in this case is [ProjectNo].