What is the error you get? Did you confirm that acCmdSaveRecord is a valid constant?
Error in VBA from DoCmd.RunCommand acCmdSaveRecord
We have moved to Access 2016 but are using databases created in Access 2003. We get an error when the VBA gets to the command:
DoCmd.RunCommand acCmdSaveRecord
So far, everything else seems to work okay.
Note: some of our computers are running Windows 7, Others are running Windows 10.
Why won't this command work? Is there a rational work-around?
Thanks
Microsoft 365 and Office | Access | For home | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
17 additional answers
Sort by: Most helpful
-
Anonymous
2020-01-14T04:40:09+00:00 Hi Arny,
If you can share your database, it might be helpful, even if there are missing tables.
If you submit feedback via the Help/Feedback button in Access, you can submit your email address, then I can contact you and you can send me a copy of your database directly (if you put ArnyBug in the text you submit, it will help my find your feedback), or sharing code here might be helpful.
Form.Dirty is a property that indicates whether a record is currently being edited. So if you have modified a record (but not yet saved it), the Dirty property of the form will be True. If you set Me!Dirty = False in a form event, then it will save the record in order to get the Dirty property back to False (no longer being edited).
Does the DoCmd.RunCommand acCmdSaveRecord command ever work for you? Is this code that was running without error in 2003, but now doesn't work in 2016?
Can you share the version/build that Access shows by About Access on the screen shown by clicking File then Account?
I can't reproduce the problem, it works as expected when I try it, and we haven't had any other recent feedback that I'm aware of that this isn't working properly.
Shane Groff
Access Engineering
-
Anonymous
2020-01-14T21:15:17+00:00 Again, let me thank you for taking your time to think about my problem.
I will try to come up with a very small database that illustrates the problem. There will be a delay in accomplishing this.
January is the month when taxes take up much of my time: Monthly tax reports + Quarterly tax reports + annual tax reports + W2 forms all must be done in January.
I will try to put a small database together using the DoCmd.RunCommand acCmdSaveRecord command but I doubt that I'll get it done before the end of the week.
I'll be in touch.
Thanks.
-
Anonymous
2020-01-14T21:18:29+00:00 Let me thank you for taking your time to think about my problem.
I will try to come up with a very small database that illustrates the problem. There will be a delay in accomplishing this.
January is the month when taxes take up much of my time: Monthly tax reports + Quarterly tax reports + annual tax reports + W2 forms all must be done in January.
I will try to put a small database together using the DoCmd.RunCommand acCmdSaveRecord command but I doubt that I'll get it done before the end of the week.
I'll be in touch.
Thanks.
-
Tom van Stiphout 40,096 Reputation points MVP Volunteer Moderator
2020-01-14T21:26:23+00:00 Much appreciated. I am trying to do the same thing myself as time permits.