"DoCmd.RunCommand acCmdSave" Works in MDB but not in MDE

Posted on 2008-11-13
Medium Priority
Last Modified: 2013-11-27
Access 2003 SP3

Why should "DoCmd.RunCommand acCmdSave"  Work in MDB but not in MDE?
In MDE file I get, error 2046, "The command or action 'Save' isn't available now."
Tried Decompiling & recompiling MDB.
Remaking MDE file several times.

Still the same problem does not arise in MDB File but does in MDE File.

Any Suggestions?


Question by:PeterRollinson
LVL 85

Accepted Solution

Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 22948850
DoCmd.RunCommand acCmdSave saves changes to an OBJECT, not data and you obviously cannot save object changes in the MDE format. To save changes to data use DoCmd.RunCommand acCmdSaveRecord, or use this, which is the preferred method:

If Me.Dirty Then Me.Dirty = FAlse


Author Closing Comment

ID: 31516323
What a stupid mistake :)

Thanks for that and thanks for the fast reply.



Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question