I want to use the F10 key as a key to save some data so I intended to use the KeyDown event to trigger this. I have found that for some reason however after I press the F10 key no other keys seem to trigger the KeyDown event until I click on the form. All other key combinations work ie: F1 then INS or F1 then F2, etc. As soon as I press F10 it will not work anymore. I included the basic code which is being used on just a blank form with no controls on it. I don't see how it could be focus as there is only one form with no controls on it.
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim i As Integer
Debug.Print "KeyCode"; KeyCode
KeyPreview = True
Select Case KeyCode
Case vbKeyInsert
Case vbKeyF1
Case vbKeyF10
Case vbKeyF12
Case Else
Debug.Print "Key Code was "; KeyCode
End Select
End Sub
Thanks,
Dan
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim i As Integer
Debug.Print "KeyCode"; KeyCode
KeyPreview = True
Select Case KeyCode
Case vbKeyInsert
Case vbKeyF1
Case vbKeyF10
Case vbKeyF12
Case Else
Debug.Print "Key Code was "; KeyCode
End Select
End Sub
Thanks,
Dan