Escape Key on Forms

C

Chris Cairns

I would like to have the escape key undo any changes on the current field if
the field has been changed on the first press and then prompt the user
before allowing them to undo all of the changes on the entire record.

How would I go about doing this. I can watch for a keypress but then it
seems to eliminate the first undo for the field.

So user updates field LastName, they decide they did not want to do that so
they press escape and it should revert back to the old value. But if the
user presses the escape key wile in a field that has not been changed or
presses it a second time then then I want to be able to prompt them before
allowing all of the updates to be lost.
 
B

BruceS

Chris,
Did some preliminary testing. Looks like Access processes the "Escape"
before it generates a "key press" event. I didn't have time to experiment
any more, but you might try trapping ASCII 27 with the "key down" command.
Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top