如何在Access中屏蔽Shift鍵?[ACCESS中國/OFFICE中國(access技...
禁止用shift鍵
Function ChangeProperty(strPropName As String, varPropType As Variant, varPropvalue As Variant) As Integer Dim dbs As Object, prp As Variant Const conPropNotFoundError = 3270 Set dbs = CurrentDb On Error GoTo Change_Err dbs.Properties(strPropName) = varPropvalue ChangeProperty = True Change_Bye: Exit Function Change_Err: If Err = conPropNotFoundError Then ' Property not found. Set prp = dbs.CreateProperty(strPropName, _ varPropType, varPropvalue) dbs.Properties.Append prp Resume Next Else ' Unknown error. ChangeProperty = False Resume Change_Bye End If End Function 調用方法: 建一個窗體,在某一按鈕的單擊事件中寫如下代碼: ChangeProperty "AllowBypassKey", 1, False 'false為禁止SHIFT鍵,TRUE為恢復
本站僅提供存儲服務,所有內容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權內容,請
點擊舉報。