Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error '2501' after pushing cancel button in a parameterquery

Status
Not open for further replies.

Barco

Programmer
Jul 26, 2002
2
BE
When I cancel my parameter-query in my application I get following error:

Run-time error '2501'

The OpenReport action was canceled

You used a method of the docmd object to carry out an action in Visual Basic, but then clicked Cancel in a dialog box.

How can I solve this how can I catch th error or...

Kind regards

Bart Coenen
 
Private Sub OpenReport()
On Error GoTo ErrorHandler

DoCmd.OpenReport "rptName", acViewNormal

Exit Sub

ErrorHandler:

If Err.Number = 2501 Then
Resume Next
End If

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top