forms

C

Cooky

I have a form that opens various reports. Have report
set for On No Data, However the from shows message "Open
report action was canceled. How can I make that message
disappear. Only want message as I entered in On No data.
 
F

fredg

I have a form that opens various reports. Have report
set for On No Data, However the from shows message "Open
report action was canceled. How can I make that message
disappear. Only want message as I entered in On No data.

You need to add error handling to trap the error 2501 in the code on
the form that opens the report:

On Error GoTo Err_Handler
DoCmd.OpenReport "ReportName"

Exit_This_Sub:
Exit Sub
Err_Handler:
If Err = 2501 Then
Else
MsgBox "Error #: " & Err.Number & " " & err.Description
End If
Resume Exit_This_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