INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Form Basics

Update or CancelUpdate without AddNew or Edit by hermanlaksko
Posted: 8 Jul 11 (Edited 11 Jul 11)

The problem occours when updating via vba code on a priv. updated form.
Using the simple - DoCmd.RunCommand acCmdSaveRecord - on the form does not work, not for me anyway.

After thorough testing I find that:

If Forms!YourForm.Dirty Then Forms.YourForm.Dirty = False

Or on a subform:
Me.YourSubFrm.Form.Dirty Then Me.YourSubFrm.Form.Dirty = False


Does the trick, setting the Dirty to false forces the form to write the record to the table(s).
Why the DoCmd action does not work I am unsure of as this command should force a write to tables, however in this case only the Dirty = false does the trick.

Back to Microsoft: Access Forms FAQ Index
Back to Microsoft: Access Forms Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close