Close Without Record Save


/ Published in: Visual Basic
Save to your folder(s)

Performing a Close action on a form can cause you to lose edits without warning.

The problem occurs if there is any reason why the record cannot be saved. e.g.:
* a required field was left blank;
* the record would create a duplicate in a unique index;
* the form's Before Update event was canceled;
* a Validation Rule was not met.

Access simply discards your edits and closes the form without warning that the record was not saved.

Develop the habit of explicitly saving whenever you do anything that requires the record to be saved, e.g. applying or removing a Filter or OrderBy property, changing a RecordSource, or moving to another record.

You must explicitly save the record before executing a Close action. For example:

URL: http://allenbrowne.com/ser-31.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.