Disable Esc Key in a Form

  • Thread starter Thread starter Guest
  • Start date Start date
I have not tested this but i took this from a previous post. I did not get
the author

To disable the Esc key in an Access form, open your form in design view.
Set the form's property called "Key Preview" to Yes.

Then select the property called "On Key Down" and click on the button with
the three dots to the right.

When the Choose Builder window appears, highlight Code Builder and click on
the OK button.

Next, paste in the following code:

If KeyCode = vbKeyEscape Then
KeyCode = 0
End If

Now, the Esc key should be disabled on your form.
 
Thanks Chris.

Chris Reveille said:
I have not tested this but i took this from a previous post. I did not get
the author

To disable the Esc key in an Access form, open your form in design view.
Set the form's property called "Key Preview" to Yes.

Then select the property called "On Key Down" and click on the button with
the three dots to the right.

When the Choose Builder window appears, highlight Code Builder and click on
the OK button.

Next, paste in the following code:

If KeyCode = vbKeyEscape Then
KeyCode = 0
End If

Now, the Esc key should be disabled on your 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