The database is stored on the network drive and is accessed by multiple users. If so, in the calling form, add to your error routine If Err.Number <> 2501 then msgbox Err.Description Resume YourExitStatementLine Nov 13 '05 #2 P: n/a fearblanco This would make sense The command being used is DoCmd.OpenReport "rptSYS_ChangeInARDaily", acViewPreview OR DoCmd.OpenReport "rptSYS_ChangeInARDaily", acViewPreview, , "Collector= '" & cmbAnalyst.Value & "'" This one particular user gets the following message: Error: 2501 - ErrorDesc: I get a "Run Time Error 2501", "The Open Report Action was canceled". https://support.microsoft.com/en-us/kb/913031
Hi Keith I can't see the error handling in the other procedure - but there is no point looking for 2501 in two places. Once I > changed that, everything is back to normal. Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free.
Also, I think you put your last End If too far to the bottom of the subroutine, so I moved it up before the GoTo labels for Exit and Error handling What is this cable hanging against the outer wall? When you call the report from the form, you can use the Filter argument of the OpenReport call: Expand|Select|Wrap|Line Numbers DoCmd.OpenReport"EmployeeReport",acViewPreview,,"tblEmployees.fldLastName='Smith'" Or what about everyone with a date of birth in Access Openreport Where Condition Example HELP!
See where this program takes you. Access Openreport Filter You should not be getting a debug button given that your error handler doesn't give a dialog with that option. Has anyone seen this problem before? http://stackoverflow.com/questions/1492231/access-canceling-report-generation-causes-error-2501 Regards, Keith.
But when I click on Cancel, the app crashes and I get an errormessage: "Runtime Error 2501: The Action OpenReport has been canceled" (translated from German). Ms Access Openreport Web|-- Other Microsoft ProductsPC|-- Network Issues|-- Q & A - Hardware|-- Q & A - Software|-- Q & A - Other PC|-- Virus + Security DiscussionUtterAccess Odds and Ends|-- General Chat|-- here are the 2 pieces of VBA code. Join Date: Nov 2006 Location: Georgia Posts: 274 Thanks: 5 Thanked 6 Times in 6 Posts Quote: Originally Posted by ShanVel Wiz47, Can you give me some more detailed explanation?
Am I missing something obvious? over here To start viewing messages, select the forum that you want to visit from the selection below. Runtime Error 2501 The Openreport Action Was Cancelled Thanks in advance to anyone who can help. Access Openreport Openargs I would put a breakpoint in a few lines above your code where it is highlighting and then step through it, a line at a time, when it breaks so that
You currently have 0 posts. I tried to trap this on the report's "on close, on error, on open, on no data" and nothing seems to work. Just add an error handler to the code you use to execute the report: Something like: Code: Private Sub Open_Report_Click() On Error GoTo Err_Report_Click DoCmd.OpenReport Me.Report, ac_Preview Exit_Report_Click: Exit Sub Err_Report_Click: Not the answer you're looking for? Access Openreport Where Condition
Find More Posts by boblarson 02-05-2007, 03:31 PM #7 ShanVel ShanMug Join Date: Oct 2005 Location: Akron, OH, USA Posts: 51 Thanks: 0 Thanked 0 When the report is started, an input box appears with an OK and a Cancel button. It's just when I hit cancel it stops at the DoCmd.OpenReport line. Error 2501 The OpenReport action was cancelled...
No error 2501. Access Openreport Wherecondition I meant to say the OnOpen event - I didn't mean to add to the confusion. Pat Jun 4 '10 #8 reply P: 31 tomric Thank you for your help.
I use this errorhandler to trap the option to cancel when someone backs out of various procedures - so the CANCEL msgbox doesn't pop up - it just exits the sub. For example, if a report is sent to the printer using the OutputReport action and the user hits cancel while it is spooling, it will return error 2501, which you can Browse other questions tagged ms-access report or ask your own question. Any ideas?? >> >> -- >> Damon Heron >> > > Damon Heron, May 5, 2006 #3 '69 Camaro Guest You're welcome.
© Copyright 2017 downloadcallwave.com. All rights reserved.