doco
Power User
- Local time
- Today, 15:31
- Joined
- Feb 14, 2007
- Messages
- 482
Just a thought...
I am making the attempt to revamp the ubiquitous IsLoaded() function to include reports. But have found
Produces an error. So resorted to using
It works but its kind of like being in the woods with a nature call and no paper: Flannel Mullen or moss will work but...

Thoughts?
I am making the attempt to revamp the ubiquitous IsLoaded() function to include reports. But have found
Code:
...
Reports(szName).CurrentView = Constant ' 0/-1
....
Produces an error. So resorted to using
Code:
Function IsLoaded(ByVal szName As String, _
Optional ByVal szType As String = "Input") As Boolean
' Returns True if the specified form is open
' in Form view or Datasheet view.
Const conObjStateClosed = 0
Const conDesignView = 0
Dim lType As Long
lType = acForm
If UCase(szType) <> "INPUT" Then
lType = acReport
End If
If SysCmd(acSysCmdGetObjectState, lType, szName) <> conObjStateClosed Then
Select Case UCase(szType)
Case "INPUT"
If Forms(szName).CurrentView <> conDesignView Then
IsLoaded = True
End If
Case Else
If Reports(szName).Visible Then
IsLoaded = True
End If
End Select
End If
End Function
It works but its kind of like being in the woods with a nature call and no paper: Flannel Mullen or moss will work but...
Thoughts?