Docmd.openreport Error 2501
Contents |
Search Community Links Social Groups Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked Posts Go to Page... Page 1 of 2 1 2 > ms access error 2501 the openform action was cancelled Thread Tools Rating: Display Modes 02-05-2007, 02:33 PM #1 ShanVel ShanMug access run time error 2501 outputto action was canceled Join Date: Oct 2005 Location: Akron, OH, USA Posts: 51 Thanks: 0 Thanked 0 Times in 0 Posts Run-time error 2501; OpenReport
Access 2010 Error 2501
action was cancelled Folks, Need your help. I searched the entire forum and found couple of postings on this, but none of them indicates if there is any fix for this problem. If there is no
Error 2501 Access
data, basically I want to show a message and close the report. I have some code to handle this under no data event like below: Private Sub Report_NoData(Cancel As Integer) MsgBox "There is no data for this report. Canceling report..." Cancel = True End Sub But this 2501 always pops up and I couldn't find a way to stop this. I also searched Microsoft knowledgebase, no help. Here's how my clik event the openreport action was canceled access 2010 procedure looks like: Private Sub cmdSearch_Click() On Error GoTo Err_PreviewRprt Dim strTbl As String Dim strSQL As String Dim strOptItem As String Dim strOptBlrType As String Dim strMsg As String, strTitle As String Dim intStyle As Integer 'Set up SQL statement for report record source If IsNull(optCriteria) Then optCriteria = 1 strTbl = Me.cboTypeOfGuar.Column(0) strOptItem = Choose(optCriteria, "memPred", "memGuar", "memRiskLevel", "memLDs") strOptBlrType = Choose(optBoilerType, "SWUP", "RB", "CFB", "All") strSQL = "SELECT tblProjts1.chrProjectName, tblProjts1.chrBlrPropNum, tblProjts1.chrBoilerType, " & _ strTbl & ".memGuranItem, " & strTbl & "." & strOptItem & _ " FROM tblProjts1 INNER JOIN " & strTbl & " ON " & _ "tblProjts1.intProjectId = " & strTbl & ".intProjectId" & _ " WHERE (((" & strTbl & ".memGuranItem)" & " IS NOT NULL)" & " AND " & "((tblProjts1.chrBoilerType) = '" & strOptBlrType & "'))" 'Open report in Design view to set the report's record source 'and search item label's caption DoCmd.Echo False 'suppress the screen updates DoCmd.OpenReport "rptBlrSrchItem1", acViewDesign With Reports("rptBlrSrchItem1") .RecordSource = strSQL .Controls("strOptItem").ControlSource = Choose(optCriteria, "memPred", "memGuar", "memRiskLevel", "memLDs") End With DoCmd.Close , , acSaveYes 'Now show the search results to the user DoCmd.OpenReport "rptBlrSrchItem1", acViewPreview DoCmd.Echo True Exit_PreviewRprt: Exit Sub Err_PreviewRprt: If Err = 2501 Then Resume Exit_PreviewRprt Else MsgBox Err.Description Resume Exit_PreviewRprt End If End Sub Any help
Custom Search UtterAccess Forums>Microsoft® Access>Access Forms Error 2501 Open Report Canceled, Office
The Openreport Action Was Canceled Access 2003
2007 Forum HomeSearchHelpUA Messages|-- UtterAccess.com NewsAccess Knowledge Center|-- Access Code Archive|-- Access Knowledgebase / FAQ|-- Access TutorialsMicrosoft® Access|-- Local Access User Groups (AUGs)|-- Interface Design|-- Access Q and A|-- Access Tables + Relationships|-- Access Queries|-- Access Forms|-- Access Reports|-- Access Macros|-- Access http://www.access-programmers.co.uk/forums/showthread.php?t=122481 Modules|-- Access Date + Time|-- Access Errors + Error Handling|-- Access Built-in Functions|-- Access Searching + Data Mining|-- Access Records|-- Access Security|-- Access Automation|-- Access Database Container|-- Tool bars, Menu bars + Ribbon|-- Access Services (Web Databases)|-- Access Data Access Pages (Deprecated)|-- Access http://www.utteraccess.com/forum/error-2501-open-report-ca-t1965198.html Data Projects - ADP|-- Access Runtime, Packaging & DeploymentAnd More...|-- Microsoft SQL Server|-- SQL Server Reporting Services|-- Microsoft SharePoint|-- Microsoft Internet Explorer|-- Visual Basic 6 and Earlier|-- Visual Basic 2003 and Later|-- ASP and VBScript|-- Web Development|-- PHP, Perl, MySQL and Postgres|-- Other Database Engines|-- BI Tools and Applications|-- JAVA and C#|-- GraphicsMicrosoft® Office|-- Microsoft Excel|-- Microsoft Excel FAQs|-- Microsoft Word|-- Microsoft Outlook|-- Microsoft PowerPoint|-- Microsoft FrontPage/Exp. Web|-- Other Microsoft ProductsPC|-- Network Issues|-- Q & A - Hardware|-- Q & A - Software|-- Q & A - Other PC|-- Virus + Security DiscussionUtterAccess Odds and Ends|-- General Chat|-- Q & A - UtterAccess.com Forums|-- Q & A - Access Wiki Options Bob GView Member Profile Apr 11 2011, 07:41 AM Post#1UtterAccess VIPPosts: 11,142Joined: 24-May 10From: CTI appear
360 games PC games https://support.microsoft.com/en-us/kb/913031 Windows games Windows phone games Entertainment All Entertainment http://windowssecrets.com/forums/showthread.php/141747-Access-2010-VBA-quot-The-OpenReport-action-was-canceled-quot Movies & TV Music Business & Education Business Students & educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet error 2501 Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All action was canceled Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
Office Applications Databases Access 2010 VBA: "The OpenReport action was canceled" If this is your first visit, be sure to check out the FAQ. You may have to Register before you can post. Results 1 to 3 of 3 Thread: Access 2010 VBA: "The OpenReport action was canceled" Tweet Thread Tools Show Printable Version Subscribe to this Thread… 2011-10-14,20:21 #1 BygAuldByrd View Profile View Forum Posts 2 Star Lounger Join Date Dec 2009 Location Bogangar NSW Australia Posts 150 Thanks 27 Thanked 2 Times in 2 Posts Access 2010 VBA: "The OpenReport action was canceled" I have a report that in Private Sub Report_Load() and Private Sub ReportHeader_Format tests for certain parameters and if not found to exist it then exits the Subs because there is no data to generate in the detail of the report. Because there is no data I run the following: Private Sub Report_NoData(Cancel As Integer) Msg = "Select a Supplier" & vbCrLf & vbCrLf & "Cancelling Report..." Button = vbExclamation Title = "Account Report Error 1..." Response = MsgBox(Msg, Button, Title) Cancel = True End Sub This sub displays the message as desired, but on clicking OK the following a MS Access error dialogue advising "The OpenReport action was canceled" is displayed. How do I stop this dialogue from being displayed? I've tried inserting an error procedure in the Private Sub Report_NoData() but that just seems to be ignored. Any suggestions will be appreciated. Regards BygAuldByrd Reply With Quote 2011-10-14,21:06 #2 johnhutchison View Profile View Forum Posts Super Moderator Join Date Jun 2002 Location Mt Macedon, Victoria, Australia Posts 3,993 Thanks 1 Thanked 45 Times in 44 Posts Add an error handler, to the code that opens the report, that handles error 2501. Something along these lines. If err.number =2501 then Resume cmdOpenreport_exit else msgbox err.description Resume cmdOpenreport_exit end if Regards John Reply With Quote 2011-10-15,18:26 #3 BygAuldByrd View Profile View Forum Posts 2 Star Lounger Join Date Dec 2009 Location Bogangar NSW Australia Posts 150 Thanks 27 Thanked 2 Times in 2 Posts Access 2010 VBA: "The OpenReport action was canceled" Hi John, Many thanks for your prompt resonse. It pointed me in the right directi