Error 2501 The Openform Action Was Canceled
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... the openform action was canceled access 2013 Thread Tools Rating: Display Modes 06-05-2007, 05:53 AM #1 manix Newly Registered the openform action was cancelled microsoft access 2010 User Join Date: Nov 2006 Location: Hampshire, UK Posts: 100 Thanks: 5 Thanked 0 Times in 0 Posts Runtime
Ms Access Error 2501
error 2501 - openform action was canceled Hi all, I am really stuck as to why this is happening. I have the following code, whereby a button opens a form on a certain
Runtime Error 2501 The Outputto Action Was Cancelled
record depending upon the part number field selected on the current form. The code used for this button is as follows: Code: Private Sub showrecord_Click() Dim stDocName As String Dim stLinkCriteria As String stDocName = "frm_partdata" stLinkCriteria = "[Part Number]=" & Me![Part Number] DoCmd.OpenForm stDocName, , , stLinkCriteria End Sub I keep getting the 2501 error code and it won't open frm_partdata I have checked the forms the openform action was canceled access 2007 on open properties and these are clear. Putting a breakpoint in the code I can see it is picking up the right form and the right part number! What am I doing wrong, it works in my other DB's!!!! Edit: the part number fields are all TEXT fields. manix View Public Profile Find More Posts by manix 06-05-2007, 06:13 AM #2 boblarson Former Moderator Join Date: Jan 2001 Location: Oregon, USA Posts: 32,482 Thanks: 94 Thanked 1,780 Times in 1,565 Posts Are there any records for that Part Number in that recordset? If there aren't, then it won't open up as there's nothing to open to and therefore it would generate a cancellation error. What happens when you open the form directly without code and search for that part number? __________________ Free tools, code and samples here: To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. boblarson View Public Profile Visit boblarson's homepage! Find More Posts by boblarson 06-05-2007, 06:18 AM #3 manix Newly Registered User Join Date: Nov 2006 Location: Hampshire, UK Posts:
Custom Search UtterAccess Forums>Microsoft® Access>Access Errors + Error Handling Error 2501 Open
Run Time Error 2501 The Openquery Action Was Cancelled
Form Action Was Canceled. Kb2596856, Access 2007 how to decompile an access database 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 http://www.access-programmers.co.uk/forums/showthread.php?t=129491 Forms|-- Access Reports|-- Access Macros|-- Access 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)|-- http://www.utteraccess.com/forum/error-2501-open-form-acti-t1992052.html Access Data Access Pages (Deprecated)|-- Access 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 gtsolanoView Member Profile Aug 15 2012, 12:12 PM Post#1Posts: 342Jo
help? Post your question and get tips & solutions from a community of 418,509 IT Pros & Developers. It's quick & easy. The OpenForm action was https://bytes.com/topic/access/answers/511913-openform-action-cancelled-2501-a cancelled. 2501 P: n/a SDL Help! I have a system that was running https://bytes.com/topic/access/answers/675072-openform-action-cancelled-only-1-user fine and I was testing a bottom level form. I went from a menu to a screen where I could enter a phone number or name to find a customer. If the customer name hit on more than one person ther is an interim selection screen. I have been running thru these screens action was for 2 days now and everything was fine and suddenly I get "The OpenForm actionwas cancelled." Run Time err 2501? This is happening on several of my OpenForm commands! stLinkCriteria = "CUSTOMER_ID = " & CUSTOMER_ID stDocName = "NEW INVOICE" DoCmd.OpenForm stDocName, , , stLinkCriteria stDocName="NEW INVOICE" stLinkCriteria="CUSTOMER_ID=6" As I said suddenly several similar opens are getting that same error? This is frustrating as hell as I'm the openform action fairly new to MS-Access VBA and have a very tight deadline. So far I have found that writing screens 20 years ago on dumb terminals with a home grown database and home grown 'CICS' with Assembler code and 3270 control characters was about the same LOL. Jul 14 '06 #1 Post Reply Share this Question 4 Replies P: n/a Allen Browne Access is informing you that the form/report did not open, so the logic in your code does not blithely proceed assuming that it is now open. If you don't care, just trap Error 2501, and ignore it. If error handling is a new concept, there's a skeleton outline in this article Error Handling in VBA at: http://allenbrowne.com/ser-23a.html It also explains how to call a generic error handler that ignores the error, and logs errors if you want that too. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "SDL" Ask a Question Need help? Post your question and get tips & solutions from a community of 418,509 IT Pros & Developers. It's quick & easy. The OpenForm action was cancelled - for only 1 user? P: n/a victoria.rego Hi there, My application is generating a "The OpenForm action was cancelled" error and I can't seem to figure out why. The best part about it is that it's only one user in the entire building - it works perfectly fine for the rest of us. So troubleshooting is extremely difficult. Here is the code involved. The command button that opens the form, the code in the form, and the code in the subform of the form. Any help would be greatly appreciated! =============================================== COMMAND BUTTON THAT OPENS THE NEW FORM =============================================== Private Sub cmdELRPContact_Click() DoCmd.OpenForm "frm_contacts", acNormal End Sub =============================================== FRM_CONTACTS =============================================== Option Compare Database Private Sub cmdCSV_Click() DoCmd.TransferText acExportDelim, "speNtfcnEmail", "03_ELRP_05", "C:\" & "temp.csv", False Shell "Excel C:\temp.csv", vbNormalFocus End Sub Private Sub cmdExport_Click() DoCmd.OutputTo acOutputQuery, "03_ELRP_04", acFormatXLS, "C: \Contacts.xls", True End Sub Private Sub cmdPrintReport_Click() DoCmd.OpenReport "rptELRP3", acViewPreview On Error Resume Next DoCmd.RunCommand acCmdPrint End Sub Private Sub Command6_Click() DoCmd.TransferText acExportDelim, , "03_ELRP_05", "C:\Contacts.csv", False Shell "Excel C:\Contacts.csv", vbNormalFocus On Error Resume Next End Sub =============================================== SUBFRM_CONTACTS A subform of frm_contacts =============================================== Option Compare Database Private Sub Combo30_AfterUpdate() ' Find the record that matches the control. Dim rs As Object Set rs = Me.Recordset.Clone rs.FindFirst "[Facility Name] = '" & Me![Combo30] & "'" If Not rs.EOF Then Me.Bookmark = rs.Bookmark End Sub Jul 10 '07 #1 Post Reply Share this Question 3 Replies P: n/a Allen Browne As you say, this could be from quite a range of causes. Suggestions: 1. First thing would be to examine the library references. Anything marked as MISSING on this machine? More info on references: http://allenbrowne.com/ser-38.html 2. If you have several users in this database at once, is it split so that everyone has a completely separate copy of the front end? More info on splitting: http://allenbrowne.com/ser-01.html 3. Is the database secured (Acces