D
DaveSwain
Hello,
I have an access form that does an openReport based on selectio
criteria; see code below:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No Data was found for your criteria, The Report will not
run unless Data is found"
Cancel = True
End Sub
.... however after my error message(MsgBox) is displayed, Another error
message pops up and says "The OpenReport Action was Canceled"
I do NOT want to display that second message, only my first 'MsgBox'
error message.
Is there anyway that I can repress the second pop-up error message(and
still have the report cancel from opening with no data?
This code is in the report btw.
The code that calls it in the form is here:
....
DoCmd.OpenReport stDocName, acPreview, , "StoreID = " & cmbFilter
....
How can I repress that second message??
thank you,
David
I have an access form that does an openReport based on selectio
criteria; see code below:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No Data was found for your criteria, The Report will not
run unless Data is found"
Cancel = True
End Sub
.... however after my error message(MsgBox) is displayed, Another error
message pops up and says "The OpenReport Action was Canceled"
I do NOT want to display that second message, only my first 'MsgBox'
error message.
Is there anyway that I can repress the second pop-up error message(and
still have the report cancel from opening with no data?
This code is in the report btw.
The code that calls it in the form is here:
....
DoCmd.OpenReport stDocName, acPreview, , "StoreID = " & cmbFilter
....
How can I repress that second message??
thank you,
David