General discussion


Rollback in Access

By tempfn1 ·
I am writing some code that allows the user to cancel any changes that they have made, i therefore need to use the esc key function, what is the code behind it?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Rollback in Access

by Seagull Data Services In reply to Rollback in Access

Depends on whether you're using a form with a recordset behind it or not.
If you are then pressing the Esc key once will undo the current field, pressing it twice will undo changes to the current record. No code required.

If you're using a form with no recordset attached (i.e. reading/writing to the recordset in code) then simply reading the current record back into the form will do the trick. If you use a flag to indicate changes, don't forget to re-set it.

Related Discussions

Related Forums