CHKarcher
Dec 3 2007, 02:24 PM
Know that I have done this before - in the call code for a report - If the query for the report is empty - how do I make it not display the report and give empty set msgbox
thanks
steve
Steve Schapel
Dec 3 2007, 02:35 PM
Steve,
You mean something like this?...
If DCount("*","MyQuery") > 0 Then
DoCmd.OpenReport "MyReport"
Else
MsgBox "No matching data"
End If
tunkefer
Dec 3 2007, 03:01 PM
You can alos use the Report_NoData event of the report to cancel the opening of the report and issue your message.
CHKarcher
Dec 3 2007, 03:14 PM
that was it - thanks
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.