G
Greg
I am trying to create a data entry form. As part of the process, I would
like to deactivate certain keys so the flow of the form is consistent. I
thought I could do as follows in a keydown event but it doesn't seem to be
working.
Am I missing something? Thanks in advance for your insight....
Greg
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
' 9 - Tab; 18 - Alt; 19 - Scroll; 33 - PgUp; 34 - PgDown; 35 - End;
36 - Home;
' 37 - LArrow; 38 - UArrow; 39 - RArrow; 40 - DArrow; 45 - Insert; 46 -
Delete;
'113 - F2; 114 - F3; 115 - F4; 116 - F5; 117 - F6; 118 - F7;
119 - F8;
'120 - F9; 121 - F10; 122 - F11; 123 - F12;
Select Case KeyCode
Case 18, 19, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 113, 114, 115,
116, 117, 118, 119, 120, 121, 122, 123
KeyCode = 0
Case Else
'Debug.Print KeyCode, Shift
End Select
End Sub
like to deactivate certain keys so the flow of the form is consistent. I
thought I could do as follows in a keydown event but it doesn't seem to be
working.
Am I missing something? Thanks in advance for your insight....
Greg
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
' 9 - Tab; 18 - Alt; 19 - Scroll; 33 - PgUp; 34 - PgDown; 35 - End;
36 - Home;
' 37 - LArrow; 38 - UArrow; 39 - RArrow; 40 - DArrow; 45 - Insert; 46 -
Delete;
'113 - F2; 114 - F3; 115 - F4; 116 - F5; 117 - F6; 118 - F7;
119 - F8;
'120 - F9; 121 - F10; 122 - F11; 123 - F12;
Select Case KeyCode
Case 18, 19, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 113, 114, 115,
116, 117, 118, 119, 120, 121, 122, 123
KeyCode = 0
Case Else
'Debug.Print KeyCode, Shift
End Select
End Sub