I'm trying to set-up a message box when my report is open that will
say there is no data for the report if there are no records in the
query. I've been able to do this for a form, but it will not work
with my report. Here is the code I use on the Open Event of a form:
If Me.RecordsetClo ne.RecordCount = 0 Then
MsgBox "There are no Open SCAR's", vbInformation
DoCmd.Close
Exit Sub
Else
DoCmd.RunMacro "max"
End If
What do I need to do for this to work on a report?
Thank you!
Chris
say there is no data for the report if there are no records in the
query. I've been able to do this for a form, but it will not work
with my report. Here is the code I use on the Open Event of a form:
If Me.RecordsetClo ne.RecordCount = 0 Then
MsgBox "There are no Open SCAR's", vbInformation
DoCmd.Close
Exit Sub
Else
DoCmd.RunMacro "max"
End If
What do I need to do for this to work on a report?
Thank you!
Chris
Comment