OpenReport action

ekta

Registered User.
Local time
Today, 08:46
Joined
Sep 6, 2002
Messages
160
Hi,

I have the code below on the No data event of my form.
Cancel = True
MsgBox " No Records were found. Please make a different selection"

It displays the above message if no records are found but after that it also displays "The OpenReport action was cancelled"
How to get rid of this?

Thanks,

Ekta
 
Try enclosing your report call whith the SetWarnings command:

docmd.setwarnings false
docmd.openreport ...
docmd.setwarnings true
 
still getting the same error.
 
Try searching here for 2501, there are many posts with examples
 

Users who are viewing this thread

Back
Top Bottom