Error in VBA from DoCmd.RunCommand acCmdSaveRecord

Anonymous
2020-01-13T21:46:35+00:00

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.

0 comments No comments
{count} votes
Answer accepted by question author
  1. ScottGem 68,780 Reputation points Volunteer Moderator
    2020-01-13T22:13:47+00:00

    What is the error you get? Did you confirm that acCmdSaveRecord is a valid constant?

    1 person found this answer helpful.
    0 comments No comments

17 additional answers

Sort by: Most helpful
  1. Anonymous
    2020-01-14T21:32:00+00:00

    Is there any chance that you can indicate what error you are getting when the command is run?

    0 comments No comments
  2. Anonymous
    2020-01-20T20:51:37+00:00

    The error simply says that the command is not available.

    My thought right now is to try to figure a work-around that will accomplish the same purpose without using that command.  Any better idea?

    0 comments No comments
  3. Anonymous
    2020-01-20T20:57:37+00:00

    Sorry, I did not find time to create a small database that could illustrate the problem.  I have two thoughts:

    1. I can probably to come up with a work-around.  the command that won't work simply saves changes to the record without moving off of the record.  I suspect that I can make note of the record, move off of it, then move back to it and it will have been saved.
    2. Failing that, I'll be back to trying to make the command work.

    If my work around works would you still like me to create the small database to illustrate it?  I don't think it'll be that hard to do and shouldn't take too much time.  I've just been busy with bigger problems this past couple of weeks and didn't get to it.

    Thanks for your help

    0 comments No comments
  4. Tom van Stiphout 40,096 Reputation points MVP Volunteer Moderator
    2020-01-20T22:03:59+00:00

    The workaround is:

    Me.Dirty = False

    0 comments No comments