返回幸运飞艇QQ群
当前位置: 主页 > 其他教程 > Access教程 >

有关ADP禁止SHIFT键的方法代码概述

时间:2012-02-18 01:03来源:Office教程学习网 www.office68.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下载
------分隔线----------------------------
推荐内容
猜你感兴趣
分享到:QQ空间新浪微博腾讯微博人人网微信

友情链接:幸运飞艇要怎么玩才能赢  幸运飞艇客服  幸运飞艇的网址  幸运飞艇聊天室app  幸运飞艇如何计算6码  幸运飞艇app  幸运飞艇备用域名  幸运飞艇哪个网站赔率高  幸运飞艇彩票正规吗  幸运飞艇预测软件