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
 
Back
Top