Deactivate Escape Key

  • Thread starter Thread starter John Renkar
  • Start date Start date
J

John Renkar

I have a form with a tab control and multiple pages. One of the end users
filled out most of the form and then hit the Escape key, which deleted his
data. Is there any way to disable the escape key, or to capture the key
press and tell Access to ignore its normal function and not delete the
information?

Thank You
 
I do as you ask quite a bit.

(in fact, in application, I actually made the esc key = save and close!)


All you need to do is in the forms property sheet, set the key preview =
yes, and then in the forms key-down event, go:


if KeyCode = vbKeyEscape then
KeyCode = 0
end if
 

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