Use the OnNoData Property of the report to display a message that there is no
data, and then close the report
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No Data"
Cancel = True
End Sub

Signature
\\// Live Long and Prosper \\//
BS"D
> I am prompting for input(the month) for the header, and it works unless the
> results of the query has 0 records. Then it turns into an error. Is there
> another way to do this?
But I need the input(month) to actually print out for audit purposes to show
that I did run it, and that it was for the month that I entered. The report
works, and there are 0 records. The problem is that the header does not
display the month for which the report was run. It also comes up blank.
Any suggestions?
> I am prompting for input(the month) for the header, and it works unless the
> results of the query has 0 records. Then it turns into an error. Is there
> another way to do this?
Duane Hookom - 16 Jan 2006 22:18 GMT
Add an unbound text box to your report header and name it "txtMonth".
Then add code to the On Format event of the report header section.
Me.txtMonth = InputBox("Enter Month")

Signature
Duane Hookom
MS Access MVP
--
> But I need the input(month) to actually print out for audit purposes to
> show
[quoted text clipped - 9 lines]
>> results of the query has 0 records. Then it turns into an error. Is there
>> another way to do this?