Disable Esc Key

Discussion in 'Microsoft Access Forms' started by Guest, Oct 15, 2004.

  1. Guest

    Guest Guest

    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
     
    Guest, Oct 15, 2004
    #1
    1. Advertisements

  2. 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" <> wrote in message
    news:...
    > 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
     
    Jamie Richards, Oct 15, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Emilio

    ESC key to close form not working

    Emilio, Aug 26, 2003, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    461
    Michel Walsh
    Sep 8, 2003
  2. Guest

    Field cleared, but ESC was not pressed

    Guest, Feb 5, 2004, in forum: Microsoft Access Forms
    Replies:
    0
    Views:
    173
    Guest
    Feb 5, 2004
  3. Guest

    Esc Key

    Guest, May 22, 2004, in forum: Microsoft Access Forms
    Replies:
    3
    Views:
    211
    Guest
    May 24, 2004
  4. Guest

    Esc Key

    Guest, Jan 4, 2006, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    214
    Allen Browne
    Jan 4, 2006
  5. Replies:
    1
    Views:
    365
    missinglinq via AccessMonster.com
    Mar 15, 2007
Loading...

Share This Page