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
Your code should look as follows:
Now, the Esc key should be disabled on your form.