Ms Access Run Time Error 2046 Saverecord
Contents |
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for
Accmdsaverecord
Help Receive Real-Time Help Create a Freelance Project Hire for access vba save record a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Run-Time Error 2046 The command or action 'SaveRecord' isn't available now Want to Advertise Here? Solved Run-Time Error 2046 The command or action 'SaveRecord' isn't available now Posted on 2008-05-07 MS Access 1 Verified Solution 2 Comments 2,411 Views Last Modified: 2011-10-03 I converted my access database from 2000 to 2003 Trying so call a small subform using the following command DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, acMenuVer70 Run-Time Error 2046 The command or action 'SaveRecord' isn't available now I tried the following command after looking at other errors in the knowledge base DoCmd.RunCommand acCmdSaveRecord Still get the same error What can I do to correct this problem. 0 Question by:needhelpfast569 Facebook Twitter LinkedIn Google LVL 75 Active today Best Solution byDatabaseMX (Joe Anderson - Access MVP) Instead of: DoCmd.RunCommand acCmdSaveRecord Try Me.Dirty = False ' Save record mx Go to Solution 2 Comments LVL 75 Overall: Level 75 MS Access 75 Message Active today Accepted Solution by:DatabaseMX (Joe Anderson - Access MVP)2008-05-07 Instead of: DoCmd.RunCommand acCmdSaveRecord Try Me.Dirty = False ' Save record mx 0 Message Author Closing Comment by:needhelpfast5692008-05-07 Thanks worked great 0 Write Comment First Name Please enter a first name Last Name Please enter a last name Email We will never share this with anyone. Comment Submit Your Comment By clicking you are agreeing to Experts Exchange's
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Problem executing DoCmd.SaveRecord on a parent form Microsoft Office for Developers > Access for Developers Question 0 Sign in to vote I have https://www.experts-exchange.com/questions/23384201/Run-Time-Error-2046-The-command-or-action-'SaveRecord'-isn't-available-now.html an invoice form with a subform containing line items. Each form/table has a timestamp field to indicate version. If I edit a line item I set the subform's timestamp in the BeforUpdate event. In the subform's AfterUpdate event, I call a public function in the parent form that update's its timestamp field. I'm getting a runtime error (2046 -Thecommand or action 'SaveRecord' isn't available now)from https://social.msdn.microsoft.com/Forums/office/en-US/c26d575e-5a2f-48ff-9682-dbe13d286a71/problem-executing-docmdsaverecord-on-a-parent-form?forum=accessdev the parent form. How can I save changes to the parent form from an event in the subform?Ed Thursday, April 14, 2011 9:10 PM Reply | Quote Answers 0 Sign in to vote You're right, I was typing from a faulty memory. The line is actually "RunCommand acCmdSaveRecord". I realize that merely editing the field doesn't save it, I was agreeing with you aboutchanging the status toDirty. I just did it with actual data. The code I have is pretty simple. ' Code in parent form. Public Function UpdateTimeStamp(FromSubform As Boolean) Me.Timestamp.Locked = False Me.Timestamp.Value = Now() 'Error occurs on next line. If FromSubform = True Then DoCmd.RunCommand acCmdSaveRecord Me.Timestamp.Locked = True End Function 'Code in subform. Private Sub Form_AfterUpdate() CalculateIntentTotal 'If a LineItem changed, we also have to update the Intent. Dim frm As [Form_Intent Master] Set frm = Me.Parent frm.UpdateTimeStamp (True) End Sub Actually, I was saying that you can save the record by explicitly setting the .Dirty property to False; that is, *not* Dirty. If you do that, Access saves the record. Try this revision of your code and tell me if it works: ' Code in parent form. Public Function UpdateTimeSt
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... Thread Tools Rate Thread Display Modes 08-21-2006, 04:50 AM #1 bhushan Guest Posts: n/a DoCmd.RunCommand acCmdSaveRecord http://www.access-programmers.co.uk/forums/showthread.php?t=113167 not working Hi there I have to make the access project to use the sql server 2000 backend. I have a problem while executing the project the command DoCmd.RunCommand acCmdSaveRecord It gives me following error Run-time error '2046' The command or http://www.pcreview.co.uk/threads/runtime-error-2046-saverecord-is-not-availble-now.1160631/ action 'SaveRecord' isn't available now. Can any body plz help me this regards 09-06-2006, 12:12 PM #2 llkhoutx Newly Registered User Join Date: Feb 2001 Location: Houston,Texas USA Posts: 3,999 Thanks: 6 Thanked 105 Times in ms access 103 Posts That could mean a non-updatable recordset is involved or possibly an non-autonumber index has not been created. It's hard to tell from your posting. __________________ Get the job done right, rather than do the right job. Do it fast or do it right. Teach a man a fish . . . If it ain't broke, don't fix it. Note that I don't open posted databases, period. llkhoutx View Public Profile Find More Posts by llkhoutx 09-07-2006, ms access run 12:57 AM #3 SQL_Hell SQL Server DBA Join Date: Dec 2003 Location: UK Posts: 1,318 Thanks: 15 Thanked 38 Times in 36 Posts Hi Humour me a second here try and use this instead.... DoCmd.RunCommand acCmdSave SQL_Hell View Public Profile Find More Posts by SQL_Hell « Previous Thread | Next Thread » Thread Tools Show Printable Version Email this Page Mark this thread as unsolved 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 a
I have an access 2000 database that I just inherrited. Everything has been working fine until today. I have a subform that has a drop down list that after performs the follwoing: DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 it is at this line that I encounter the runtime error '2046' The action or command 'SaveRecord' is not available now. I have debugged and debugged and am at a loss... Why would this "all of a sudden" start to occur? What could I have possbly have done that would cause this to break? Any insight or advice would be greatly appreciated! Thanks Guest, Mar 9, 2005 #1 Advertisements Guest Guest So I jusr tried the If Me.Dirty = true then Me.Dirty = fals trick and it worked.... but I am still curious as to why? Thanks again "Tsuki" wrote: > I have an access 2000 database that I just inherrited. Everything has been > working fine until today. I have a subform that has a drop down list that > after performs the follwoing: > DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 > > it is at this line that I encounter the runtime error '2046' The action or > command 'SaveRecord' is not available now. > > I have debugged and debugged and am at a loss... Why would this "all of a > sudden" start to occur? What could I have possbly have done that would cause > this to break? > > Any insight or advice would be greatly appreciated! > Thanks Guest, Mar 9, 2005 #2 Advertisements Guest Guest Hi Tsuki, Are you getting this message whilst you are in "Break" mode debugging? If so then that is why, you cannot run that command in Break. If not, try "DoCmd.RunCommand acCmdSaveRecord" - that is the MS preferred method, the other method is for backwards compatability. "Tsuki" wrote: > > So I jusr tried the > If Me.Dirty = true then Me.Dirty = fals > trick and it worked.... but I am still curious as to why? > > Thanks again > > "Tsuki" wrote: > > > I have an access 2000 database that I just inherrited. Everything has been > > working fine until today. I have a subform that has a drop down list that > > after performs the follwoing: > > DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 > > > > it is at this line that I encounter the runtime error '2046' The action or > > command 'SaveRecord' is not available now. > > > > I have debugged and debugged and am at a loss... Why would this "all of a > > sudden" start to occur? What could I have possbly have done that would cause > > this to break? > > > > Any insight or advice would be greatly appreciated! > > Thanks Guest, Mar 9, 2005 #3 Advertisements Show Ignored Content Want to reply to this thread or ask your own question? It