有关ADP禁止SHIFT键的方法-王宇虹
Access软件网QQ交流学习群(群号码198465573),欢迎您的加入!
首页 >技术文章> ADP及SQL SERVER


有关ADP禁止SHIFT键的方法

发表时间:2003/12/14 9:30:54 评论(0) 浏览(8692)  评论 | 加入收藏 | 复制
   
摘 要:有关ADP禁止SHIFT键的方法
正 文:

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 


Access软件网交流QQ群(群号:198465573)
 
 相关文章
关于大型数据库项目(ADP)  【UMVsoft整理  2008/5/12】
ADP 的启动过程控制探讨  【朱亦文  2009/6/4】
adp项目的发布  【煮茶论道  2012/1/10】
access2013不支持adp了是吗?  【麥田  2012/11/2】
使用ADP进行mdb数据库开发的实现方案\ADO报表(使用ADP的...  【朱亦文  2013/10/23】
adp项目中模糊查询犯过的错误  【路漫漫  2013/10/27】
拆分MDB方式,ODBC链接SQLSERVER方式,adp方式--...  【小华  2014/5/23】
常见问答
技术分类
相关资源
文章搜索
关于作者

王宇虹

文章分类

文章存档

友情链接