ChrisTheAncient
Technical User
I'm working on a derivative on NWinds using Access XP.
There is a utilities module to detect if a form is open (or not!) prior to opening that form...
Code:
Function IsLoaded(ByVal strFormName As String) As Boolean
' Returns True if the specified form is open in Form view or Datasheet view.
Const conObjStateClosed = 0
Const conDesignView = 0
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsLoaded = True
End If
End If
End Function
The help system - and my brain - is not being a lot of help in my next step!
I want to run the other way round with something I'm trying to do, and use a function to detect if a report is open (in either print preview or design mode).
Can the above function be modified to check if a report is open?
TIA
Chris
*************************************
OK, I'm stoopid. But I'm good at it!
*************************************