General discussion

Locked

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.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Rollback in Access

by donq In reply to Rollback in Access

The simple answer is to use the sendkeys statement:

SendKeys "{ESC}", False

The True / False part tells Access to wait until the user does something (True) or instructsto do the rollback now!

Collapse -

Rollback in Access

by tempfn1 In reply to Rollback in Access

The question was auto-closed by TechRepublic

Collapse -

Rollback in Access

by JMPlancke In reply to Rollback in Access

OK answer 1 is not bad but...
The escape key cancel only the last "update" which means only the last modified field; to undo all the changed fields, you need to send 2 escape keys.
There is also a way to undo a saved record with the CTRL Z which should be written sendkeys "^Z"

Collapse -

Rollback in Access

by tempfn1 In reply to Rollback in Access

The question was auto-closed by TechRepublic

Collapse -

Rollback in Access

by tempfn1 In reply to Rollback in Access

This question was auto closed due to inactivity

Back to Software Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums