Function IsLoaded(ByVal strFormName As String) As Boolean
Dim oAccessObject As AccessObject
Set oAccessObject = CurrentProject.AllForms(strFormName)
If oAccessObject.IsLoaded Then
If oAccessObject.CurrentView <> acCurViewDesign Then
IsLoaded = True
End If
End If
End Function
在瑭子里找了一个
Function IsLoaded(strName As String, Optional intObjectType As Integer =
acForm)
IsLoaded = (SysCmd(acSysCmdGetObjectState, intObjectType, strName))
End Function