Private Sub Form_Load()
Me.KeyPreview = True
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyM Then
mSta = True
End If
If KeyCode = vbKeyb Then
bSta = True
End If
If Shift = 1 And mSta = True And bSta = True Then
DoCmd.OpenForm "部门"
mSta = False
bSta = False
End If
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyM Then
mSta = False
End If
If KeyCode = vbKeyB Then
bSta = False
End If
End Sub