IsOpen or IsLoaded?

E

ElizCat

I need to find out if a form is open, and I'm having problems working with
IsOpen and IsLoaded. I can't seem to get the syntax for the arguements
right. Can someone please explain the difference between the two and give a
reference for the syntax used with each?

Thanks - ElizCat
 
F

fredg

I need to find out if a form is open, and I'm having problems working with
IsOpen and IsLoaded. I can't seem to get the syntax for the arguements
right. Can someone please explain the difference between the two and give a
reference for the syntax used with each?

Thanks - ElizCat

I assume you are not using Access 97 or older.

IsOpen applies to a HTMLProjectItem Object.
IsLoaded applies to an AccessObject.Object.

This sounds like a classroom assignment.
Since VBA help has information and an example of each it might be
helpful to you to refer to it.
 
E

ElizCat

After looking in the Forms Coding message group, it seems that my confusion
might stem from variations between Access 97 and Access 2002 (the version I
am using). And no, this is not for a class... I'm just a novice and am
working from some books (on Access97, hence my confusion) a colleague loaned
me. I've got the double-whammy of being a novice and not having a background
in CompSci, so I'm having some difficulty translating VB-ese to plain English.

So, here's what I tried (based on the VB Help example)

If CurrentProject.AllForms("FormOfInterest").IsLoaded Then
'do one thing
Else
'do something else
End If

However, this isn't working. VB is not reading IsLoaded = True and doing
the appropriate code. I'll try Ofer's suggestion to call a function to
return True/False, but I wondered where I went wrong.

I appreciate your feedback.

ElizCat


:
 
E

ElizCat

Thanks for the reference - it worked just fine, once I figured out that I had
to put the Public Function code in the General section of the Form(s) I'm
working in.
 
Top