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?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Emilio

    ESC key to close form not working

    Emilio, Aug 26, 2003, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    836
    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:
    286
    Guest
    Feb 5, 2004
  3. Guest

    Esc Key

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

    Disable any key globally for complete database

    Irshad Alam, Aug 17, 2004, in forum: Microsoft Access Forms
    Replies:
    0
    Views:
    217
    Irshad Alam
    Aug 17, 2004
  5. Guest

    Disable apostrophe/quotation mark key

    Guest, Jul 21, 2005, in forum: Microsoft Access Forms
    Replies:
    2
    Views:
    3,098
    Guest
    Jul 21, 2005
  6. Guest

    Esc Key

    Guest, Jan 4, 2006, in forum: Microsoft Access Forms
    Replies:
    1
    Views:
    315
    Allen Browne
    Jan 4, 2006
  7. Guest

    Putting a Hot Key on a form and disable the binoculars

    Guest, Mar 20, 2006, in forum: Microsoft Access Forms
    Replies:
    0
    Views:
    277
    Guest
    Mar 20, 2006
  8. Replies:
    1
    Views:
    511
    missinglinq via AccessMonster.com
    Mar 15, 2007
Loading...