Prompt to View blank report

R

RW

I need to prompt the user as to whether they want to see a blank report (one
manager wants the blank report saved so all reports will be saved for a month
and if one isn't in the folder then it was not run). However, for most
reports a blank one does not need to be saved. I'm using the same report
layout for multiple reports. The The code below prompts the user twice. I
only need it to prompt once.
Please help.

Thanks

Private Sub Report_NoData(Cancel As Integer)
Dim StrMsg As String
Dim StrTitle As String
StrMsg = "There isn't any data that matches the criteria you have selected."
& vbCrLf
StrMsg = StrMsg & "Would you like to see a blank report?"
StrTitle = "No Matches Found!"
Response = MsgBox(StrMsg, vbYesNo, StrTitle)
If Response = 6 Then
Cancel = False
Else
'Don't open the report
Cancel = True
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top