I've created a form in Access 2000 that I use for entering RMA information. When I open the form, I create a new record in the table and assign the RMA based off the ID key number. I display the RMA number in a text box on the form. I've noticed that if the user goes to any text box on my form and presses ESC twice, all info on the screen (for example, the RMA number display) will go blank! Best that I can tell, it appears that the undo command is being run when ESC is pressed. Is there a way to remap ESC so that it will not do this? I've tried adding the following code "On Key Down" event
This works, but I must add this to every text box, combo box, etc. on my form. Is there an easier way to do this?
Also, I've noticed that I can no longer run the "delete record" command after ESC has been pressed twice.
Why is this?
Thanks in advance!
Code:
Private Sub cb_phone_lookup_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then KeyCode = 0
End Sub
This works, but I must add this to every text box, combo box, etc. on my form. Is there an easier way to do this?
Also, I've noticed that I can no longer run the "delete record" command after ESC has been pressed twice.
Code:
' delete record
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Why is this?
Thanks in advance!