ACC2: Setting KeyCode=0 for KeyDown Does Not Ignore All KeysID: Q120827
|
Moderate: Requires basic macro, coding, and interoperability skills.
Setting KeyCode to 0 in the event procedure for a form or form control's
OnKeyDown property does not trap all keys and key combinations.
This behavior is by design.
Setting KeyCode to 0 causes the following keys and key combinations to be
trapped:
TAB F6 F7
SHIFT+TAB SHIFT+F6 F2
F1 F4 SHIFT+DEL
CTRL+SHIFT+TAB CTRL+TAB ALT+TAB
CTRL+C CTRL+F CTRL+H
CTRL+N CTRL+O CTRL+P
CTRL+S CTRL+V CTRL+X
CTRL+Z CTRL+SHIFT+HOME END
CTRL+ENTER BACKSPACE CTRL+INSERT
SHIFT+INSERT ALT+BACKSPACE F11
F12
F11 F12 SHIFT+F12
Sub Contact_Name_KeyDown (KeyCode As Integer, Shift As Integer)
KeyCode = 0
End Sub
Microsoft Access "Building Applications," version 2.0, Chapter 8, "Events,"
page 200
For more information about the KeyDown event, search for "KeyDown," and
then "KeyDown, KeyUp Events" using the Microsoft Access Help menu.
Additional query words: keyup
Keywords : kbusage FmsEvnt
Version : 2.0
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: April 7, 1999