Make sure you have KeyPreview set to yes for the form and paste the
following behind it:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then
'Comment out the next line, it's just for demo purposes
MsgBox "Esc key disabled."
KeyCode = 0
End If
End Sub
HTH
Jamie
"Ripper" <(E-Mail Removed)> wrote in message
news:E5DBAAE7-169E-408A-BD51-(E-Mail Removed)...
> Is there a way to disbale the ESC key so that it won't erase the current
> unentered data? If a kiddo pushes in their keyboard, sometimes a fault in
> the design of the keyboard tray will hit their ESC key and erase their
> work.
> The easiest way is to disable the ESC key. How?
> --
> Thanks As Always
> Rip
|