How can i Disable (Esc)ape Key???

  • Thread starter Thread starter is_rick
  • Start date Start date
I

is_rick

Guest
How can i Disable esc key from Undoing and Clearing all the Entries i just made in a form? Especially when mistakenly press the ESC key twice? please???? anybody???
 
Open your form in design view. In the Form's property list find the "Key Preview" property. Change this property to "Yes" (without the quotes), the default for this property is "No".

Now got to the "On Key Down" event of the form place the following code:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then ' 27 is the Escape Key
  KeyCode = 0
End If
End Sub

HTH
RDH

[This message has been edited by R. Hicks (edited 11-12-2001).]
 
Thanks Hicks. It works... Your a saviour!
The thing is im not much good in Access. But my current jod demands it. Thanks alot. I've got a lot more to ask though... Ill post it later. Thanks again... God Bless!
 
You are very welcome ...... :-)

Go ahead and ask your questions, there are many knowledgable people here who will be happy to help you with your problems.

RDH
 

Users who are viewing this thread

Back
Top Bottom