Office中国论坛/Access中国论坛
标题:
[转帖]判断窗体是否打开的两种方法
[打印本页]
作者:
tiangxc
时间:
2005-10-6 20:41
标题:
[转帖]判断窗体是否打开的两种方法
判断窗体是否打开的两种方法
Function IsLoaded(strName As String, Optional intObjectType As Integer =
acForm)
IsLoaded = (SysCmd(acSysCmdGetObjectState, intObjectType, strName) <> 0)
End Function
函数二
Function IsFormLoaded(strFrmName As String) As Boolean
Const conFormDesign = 0
Dim intX As Integer
IsFormLoaded= False
For intX = 0 To Forms.Count - 1
If Forms(intX).FormName = strFrmName Then
If Forms(intX).CurrentView <> conFormDesign Then
IsFormLoaded= True
Exit Function ' Quit function once form has been found.
End If
End If
Next
End Function
作者:
zyp
时间:
2005-10-6 22:16
方法三:if currentProject.Allfores("formName").IsLoaded=true then
作者:
heqing3000
时间:
2006-11-4 16:39
顶上来,大家学习!
作者:
tz-chf
时间:
2006-11-4 17:37
northwind里有了,照抄就行。拿来主义。
作者:
lirong
时间:
2007-9-21 22:15
原帖由
zyp
于 2005-10-6 22:16 发表
方法三:if currentProject.Allfores("formName").IsLoaded=true then
你的方法好像行不通,用的那个版本??
作者:
andymark
时间:
2007-9-21 23:01
原帖由
zyp
于 2005-10-6 22:16 发表
方法三:if currentProject.Allfores("formName").IsLoaded=true then
应该是AllForms
If CurrentProject.AllForms("formName").IsLoaded = True Then
作者:
xryacc
时间:
2007-9-23 01:02
标题:
谢谢了。
谢谢了,谢谢分享给菜鸟们。
作者:
zxp
时间:
2009-3-5 15:13
谢谢奉献,拿了就该谢一声
作者:
apsfxc1
时间:
2009-9-9 08:42
学习
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3