I have form which handles Shift-Esc by calling a close of the form (See line #6 below).
Although identical code works fine from my cmdExit button, whenever this executes (from within the KeyDown event procedure) it causes the application (Access) to exit completely.
I'd be interested to hear of anything that can throw any light on the matter.
Running Access 2000 on Windows 2000 Server.
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If (Shift And acShiftMask) <> acShiftMask Then Exit Sub
On Error Resume Next
Select Case KeyCode
Case vbKeyEscape
Call DoCmd.Close
Case vbKeyUp
Call DoCmd.GoToRecord(Record:=acPrevious)
Case vbKeyDown
Call DoCmd.GoToRecord(Record:=acNext)
End Select
End Sub
I'd be interested to hear of anything that can throw any light on the matter.
Running Access 2000 on Windows 2000 Server.
Comment