<em id="pj4oa"><acronym id="pj4oa"></acronym></em><button id="pj4oa"><object id="pj4oa"></object></button>
<progress id="pj4oa"><track id="pj4oa"><rt id="pj4oa"></rt></track></progress>

    <dd id="pj4oa"></dd>
    <th id="pj4oa"></th>

    返回首頁
    當前位置: 主頁 > 其他教程 > Access教程 >

    有關ADP禁止SHIFT鍵的方法代碼概述

    時間:2012-02-18 01:03來源:Office教程學習網 www.tin22.com編輯:麥田守望者

    Function DisableBypassADP(blnYesNo As Boolean)
    CurrentProject.Properties.Add "AllowByPassKey", blnYesNo
    End Function

    然后在啟動時調用 DisableBypassADP(false)

    更詳細的做法:

    Function SetMyProperty(MyPropName As String, MyPropvalue As Variant) As Boolean
    On Error GoTo SetMyProperty_In_Err
    Dim Ix As Integer
    With CurrentProject.Properties
    If fn_PropertyExist(MyPropName) Then 'check if it already exists
    For Ix = 0 To .Count - 1
    If .Item(Ix).Name = MyPropName Then
    .Item(Ix).value = MyPropvalue
    End If
    Next Ix
    Else
    .Add MyPropName, MyPropvalue
    End If
    End With
    SetMyProperty = True

    SetMyProperty_Exit:
    Exit Function

    SetMyProperty_In_Err:

    MsgBox "設置屬性出錯:", Err, Error$
    SetMyProperty = False
    Resume SetMyProperty_Exit

    End Function
    '--------檢查屬性是否存在---
    Private Function fn_PropertyExist(MyPropName As String) As Boolean
    fn_PropertyExist = False
    Dim Ix As Integer
    With CurrentProject.Properties
    For Ix = 0 To .Count - 1
    If .Item(Ix).Name = MyPropName Then
    fn_PropertyExist = True
    Exit For
    End If
    Next Ix
    End With
    End Function
     

    Public Function setByPass()
    SetMyProperty "AllowBypassKey", True
    End Function

    ------分隔線----------------------------
    標簽(Tag):access access數據庫 數據庫 access視頻教程 access教程 access技巧 access下載
    ------分隔線----------------------------
    推薦內容
    猜你感興趣
    五月婷婷福利