Detect Esc Key Press

rich.barry

Registered User.
Local time
Today, 04:02
Joined
Aug 19, 2001
Messages
176
I have a form which has the key field hidden, and an unbound textbox which shows its value via some code.
Reason is if user puts in a value that already exists, the code will make the whole form jump to the existing record.

Everything is synchronised OK apart from if a new record is being entered, then the user presses Esc to clear the record.
What event does Esc generate that I can detect?

Also, have I outdone myself coding this i.e. is there some easier way to jump to an existing record if the key is entered, rather than bringing up a duplicate entry right at the end.

Thanks

Richard

[This message has been edited by rich.barry (edited 05-29-2002).]
 
Trap the escape key with event "On Key Press."
 
mmmm...that was a bit obvious
Had to turn KeyPreview on, but it works fine.

Thanks
 

Users who are viewing this thread

Back
Top Bottom