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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preview Report Cancel

Status
Not open for further replies.

howardjones

Programmer
Joined
Sep 17, 2001
Messages
6
Location
GB
I have some problem with cancelling a report once an error has occurred. I have trapped the error but I also need to stop the preview of the report

DoCmd.Close acReport, "RprQryTeamScores2"

this code give me a runtime error 2585 I need to suppress this messege and stop the report from preview.

Thanks for any help in advance
 
To close the report after an error, put
Code:
DoCmd.Close
in your report's OnError event handler, after handling any error messages you may want to display.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top