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-22T17:11:53+00:00

    Thanks, I'll try that.

    I have tried using me.dirty = false  ---- and it seemed to work ---- sometimes - but not other times.  I am currently testing a database where I have put in me.dirty = false ---- but in a slightly different place - and so far, it's working.

    I like you idea better which may make the original command work when it's needed and skip when it's not.

    I'd feel better about the whole situation if I really understood more about what these commands did.   I got the DoCmd.RunCommand acCmdSaveRecord  from a really great guy named Mike Smith who taught me the little that I know about ACCESS and VBA about 15 years ago.    I have no idea where to find Mike Smith now and with a name like that there's no much chance of finding him again.

    Any chance you can explain how these commands work and why one may work while the other doesn't?

    Thanks.

    0 comments No comments