How to program Esc Key to exit form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Could anybody help me to find out how to program Esc Key to exit an open form.

thanks for your help!
 
Escape Key has special functions (undo current entry then undo current
record) in Forms.

Do you really want to override these special functions?

If you do, set the Form's KeyPreview to True and then use the Form's
KeyPress (or KeyDown?) Event to check for the Escape Key and close the Form
accordingly. You may need to use the Undo Method to undo the current edits
on the Form.
 

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

Back
Top