| 网站首页 | 新闻 | 新书 | 专家 | 技巧 | 源码作品 | 工具/资源 | 商城 | 风采 | 留言 | 论坛 | 网址 | 承接 | 
您现在的位置: Access/Office中国 >> 技巧 >> Access >> 安全加解密 >> 文章正文 用户登录 新用户注册
在ADP/ADE中禁止SHIFT键的方法         
在ADP/ADE中禁止SHIFT键的方法
作者:tmtony 文章来源:ACCESS中国 点击数: 本日:{$DayHits} 更新时间:2003-12-12 22:09:44

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 

文章录入:tmtony    责任编辑:tmtony 
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    专 题 栏 目
    最 新 热 门
    最 新 推 荐
    相 关 文 章
    ADP项目中创建ADP的数据
    Access中MDB转ADP最先遇
    如何禁止Access主窗体右
    ADP(SQL SERVER)中的交
    重新启用SHIFT安全键
    第一次使用ACCESS2003的
    设置是否充许使用SHIFT安
    重新启用SHIFT安全键
    禁止使用SHIFT键打开MDB
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)