isloaded help.

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
 
A

Allen Browne

No. The IsLoaded() function from the Nortwind database should return True
for a form that is open, even if its Visible property is False.
 
A

Andy Cole

Lee

Use this instead;

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

HTH

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top