I created report and add code (see picture) on event ON OPEN to open form to supply parameter to report but I got this error.
I created report and add code (see picture) on event ON OPEN to open form to supply parameter to report but I got this error.
Have you used this "IsLoaded" function before?
No, never. I copied this code from some microsoft links...
You need to copy the code for the function as well. If you can't find it I believe I have it somewhere.
Found the problem. I need to create a new module to declare variable bInReportOpenEvent (using a Dim statement)
This function belongs in a Standard Module:
Code:Public 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
Thanks RuralGuy for your help![]()
Are you ready to use the Thread Tools and mark this thread as Solved?