Access 2010 Error 2489
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about ms access goto record in subform hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
Ms Access Gotorecord
Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. access vba goto new record in subform Join them; it only takes a minute: Sign up Making “DoCmd.GoToRecord” function work on a subform up vote 5 down vote favorite 1 I have been using the function DoCmd.GoToRecord , , acNewRec successfully for creating and moving to access form goto new record a new record within a subform (with a table as the source). However, when I try to do the same from the parent form, this does not work. I have tried different approaches, including: Me.sbfrm_subform.Controls("ctrName").SetFocus DoCmd.GoToRecord , , acNewRec which only sets the focus on the control (ctrName), but fails to add and go to a new record, or DoCmd.GoToRecord acDataForm, Me.sbfrm_subform.Form.Name, acLast Which returns the runtime error 2489, "The object 'sbfrm_subform is nt open." ms-access access-vba share|improve
Docmd.gotorecord Acnewrec
this question edited Jun 27 '13 at 16:56 HansUp 79.1k114371 asked Jun 27 '13 at 15:41 Kambiz 54118 add a comment| 4 Answers 4 active oldest votes up vote 3 down vote accepted Try placing the code into the subform and then call it from the Parent: Sub Form Code: Sub GoToNewRecord() DoCmd.GoToRecord , , acNewRec End Sub Parent Form Code: Me.sbfrm_subform.GoToNewRecord share|improve this answer edited Jun 29 '13 at 19:25 answered Jun 27 '13 at 15:48 Layman Coder 583213 This looks like a very elegant solution, but I cant make it work. I specifically go to the subform code, put the Sub GotoNewRecord() in there, and then try to access it from the main form (Me). It does nt recognize the sub, and gives a compile error (expected :=). I made the sub Public as well, but did nt help. I m curious what am I doing wrong. –Kambiz Jun 29 '13 at 17:02 Apologies. The parentheses is probably what messed it up. :-( –Layman Coder Jun 29 '13 at 19:24 add a comment| up vote 6 down vote Try splitting the operations: Me.[sbfrm_subform].SetFocus DoCmd.GoToRecord, , acNewRec Alternatively, you can try creating a public Sub in the subform, and since it becomes a method of the form you can use that. Using this on recent versions of Access, you can even try playing directly with the fo
Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked Posts Go to Page... Thread Tools Rate Thread Display Modes 04-01-2009, 07:47 AM #1 ssaucedo Registered User Join Date: Jan 2009 Posts: 11 Thanks: 0 Thanked 0 Times in 0 Posts docmd.findrecord example Macro Error 2489 I have a form/subform when i get to the last field in the subform I docmd.gotorecord acnext want the cursor to tab back to the first field in the main form and go into data entry mode. so i embedded a macro on the
Docmd.gotorecord Acnewrec Not Working
exit event in the last field of the subform and is as follows: SelectObject - Form, NewInv, No GoToControl - cta RunCommand - DataEntry StopMacro but then when the data entry is finished and i try to close the form i get the following message: http://stackoverflow.com/questions/17347503/making-docmd-gotorecord-function-work-on-a-subform the object "NewInv isnt open" The macro you are running (directly or indirectly) contains a gotorecord, repaintobject, or selectobject action, but the object name argument names an object that is closed. The objectname argument for the gotorecord, repaintobject, or selectobject method names an object that is closed. Use one of the open actions or methods to open the object so that you can carry out the desired action So what do I do to eliminate the error message? It appears that Access thinks that I closed the form in error. http://www.access-programmers.co.uk/forums/showthread.php?t=169200 ssaucedo View Public Profile Find More Posts by ssaucedo « Previous Thread | Next Thread » Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Rate This Thread Excellent Good Average Bad Terrible Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Access World Access World News Site Suggestions Introduce Yourself The Watercooler Microsoft Access Discussion General Tables Queries Forms Reports Macros Modules & VBA Theory and practice of database design Access Web Microsoft Access Reference Access FAQs Code Repository Sample Databases Microsoft Access Tutorials Microsoft Access User Groups Apps and Windows SQL Server Crystal Reports Visual Basic VB.NET Word Excel Web Design and Development ASP and ASP.NET PHP & MySQL Windows Other Software Hardware Questions and Answers Non-Access Issues Politics & Current Events Debates Gaming Sports, Health & Fitness Gadgets Small Business Similar Threads Thread Thread Starter Forum Replies Last Post need macro to run every 5min? teeitup Macros 13 02-19-2009 11:36 PM How to use a macro to change the macro linked to a command button event? travisbicks Macros 6 12-03-2008 05:1
from GoogleSign inHidden fieldsSearch for groups or messages
Visual SourceBook Total Access Speller Total Access Startup Total Access Statistics Multi-Product Suites >> Overview of Suites Total Access Ultimate Suite Total Access Developer Suite Total Visual Developer Suite Visual Basic 6 >> Total Visual Agent Total Visual CodeTools Total Visual SourceBook Total VB Statistics Multi-Product Suites >> Overview of Suites Total Visual Developer Suite Total Visual Enterprise Suite Sentinel Visualizer Total ZipCode Database Catalog and Fliers Product Awards Product Reviews Product User Matrix Pre-Sale FAQs Version Compatibility Chart Language Support User Manuals Order News Announcements Current Newsletter Upcoming Events Product Reviews Media Videos Free Resources Overview Product Demos Microsoft Access Developer Help Center Microsoft Access Query Help Center Microsoft Access to SQL Server Upsizing Microsoft Outlook Tips Technical Whitepapers Tips and Techniques Technical Videos Consulting Overview Success Stories Technical Expertise Microsoft Access About About Us Contact Us Why Choose FMS? Awards Quality Pledge Microsoft Access 2010 Error Numbers and Descriptions Here is a list of all 2,976 error codes and descriptions for Microsoft Access 2010. Ranging from error number 3 to 32682, each error code describes a different event. Some of the descriptions have tokens (e.g. | and @) that are replaced by Access with text for the specific error. This list of error numbers and descriptions is also available in a PDF file: Microsoft Access 2010 Error Number and Descriptions 100 page PDF Report (738 K) Most of the error numbers and descriptions are identical to past versions, but there are some differences. To see how the error messages compare to Microsoft Access 2007 and 2003, read this: Microsoft Access 2010-2003 Error Number and Descriptions 205 page PDF Report (1.3 MB) Additional Resources Technical Paper: Error Handling and Debugging Tips and Techniques for Microsoft Access, VBA, and Visual Basic 6 (VB6) Error between Access 2007 and 2010: You cannot save this database in an earlier version format, because it uses features that require the current file format Main Error Number and Description page For additional Microsoft Access help visit our: Microsoft Access Resource Center Microsoft Access Developer Help Center Microsoft Access Developer Services Error Number Error Description 3 Return without GoSub 5 Invalid procedure call or argument 6 Overflow 7 Out of memory 9 Subscript out of range 10 This array is fixed or temporarily locked 11 Division by zero 13 Type mismatch 14 Out of string space 16 Expression to