isloaded help.

  • Thread starter Thread starter Lee Taylor-Vaughan
  • Start date Start date
L

Lee Taylor-Vaughan

When i type in the immediate window
? IsLoaded(frmStatusMonitor) it returns false if the form is invisible, is
this normal?
why does it return false if the form is invisible?

TIA

Lee



here is the isloaded code that i am using.


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
 
No. The IsLoaded() function from the Nortwind database should return True
for a form that is open, even if its Visible property is False.
 
Lee

Use this instead;

?IsLoaded("frmStatusMonitor"). The IsLoaded expects a string parameter Form
Name, not the actual form

HTH

Andy
 
Back
Top