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

Posted on 2008-11-13
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 84

    Accepted Solution

    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

    What a stupid mistake :)

    Thanks for that and thanks for the fast reply.



    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
    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 …
    Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now