ACCESS中如何禁用Shift键和启用Shift键.../?
可以按以下代码建立一个窗体,,,
========================================================================
Function CloseBypassKey()
Dim p
On Error Resume Next
Set p = CurrentDb.CreateProperty _
("AllowBypassKey", DB_BOOLEAN, False)
CurrentDb.Properties.Append p
CurrentDb.Properties("AllowBypassKey") = False
End Function
Function OpenBypassKey()
Dim p
On Error Resume Next
Set p = CurrentDb.CreateProperty _
("AllowBypassKey", DB_BOOLEAN, True)
CurrentDb.Properties.Append p
CurrentDb.Properties("AllowBypassKey") = True
End Function
Private Sub Command0_Click()
If MsgBox("你要启用Shift键吗?", vbYesNo + vbQuestion + vbDefaultButton2, "提示") = vbYes Then
OpenBypassKey
End If
End Sub
Private Sub Command1_Click()
If MsgBox("你要禁用Shift键吗?", vbYesNo + vbQuestion + vbDefaultButton2, "提示") = vbYes Then
CloseBypassKey
End If
End Sub
============================================================================