Share via

Record Not Saving

Anonymous
2010-12-02T14:47:07+00:00

Trying to save a record on a form with save button - but getting 'action was canceled' msg and not allowing save or move to next record.  I have tried with DoCmd.DoMenuItem and DoCmd.RunCommand acCmdSaveRecord.  Not sure where to check to clear this message.  I have seen the message before but can usually click OK to procede.  


SteveStad

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

4 answers

Sort by: Most helpful
  1. Anonymous
    2010-12-02T16:29:58+00:00

    Marshall - it was the a'cancel = true' line in the form before update event for a piece of code that updates a check box if the vac_date_it_01_beg date is filled in.  I removed the line and the record saves now.  

    Thanks.


    SteveStad

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-12-02T14:58:51+00:00

    That can happen if the record would violate referential integrity, fails a validation rule, the form's BeforeUpdate event cancels the update or, depending on your record locking, if another process or form is also modifyng the record.

    Try saving with:

       Me.Dirty = False

    and see if you can get a more meaningful message.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-12-02T14:53:59+00:00

    in the onclick event of your save button try:

    If Me.Dirty=True Then Me.Dirty=False

    Also, add in error handling so if you get any errors you get the Err.Number and Err.Description.  These will help us troubleshoot further.


    Daniel Pineault, 2010-2011 Microsoft MVP

    http://www.cardaconsultants.com

    MS Access Tips and Code Samples: http://www.devhut.net

    Was this answer helpful?

    0 comments No comments
  4. HansV 462.6K Reputation points
    2010-12-02T14:52:13+00:00

    Please use the on click event procedure of the save button.

    Was this answer helpful?

    0 comments No comments