checking for an open form if another form is open

G

Guest

I'm trying to find an easy way to check to see if a different form is open
but set to invisible so I can make if visible after I close the current form.
The only way I have have found to work is create a hidden text box and set a
value in the box. Using an IF..EndIF statement I can check to see if there is
a value in the box and work from there.

There must be an easier way to do this. Any help would be appreciated.

Jsrogol
 
M

Marshall Barton

jsrogol said:
I'm trying to find an easy way to check to see if a different form is open
but set to invisible so I can make if visible after I close the current form.
The only way I have have found to work is create a hidden text box and set a
value in the box. Using an IF..EndIF statement I can check to see if there is
a value in the box and work from there.

There must be an easier way to do this. Any help would be appreciated.


If CurrentProject.AllForms!differentform.IsLoaded Then
Forms!differentform.Visible = True
Else
DoCmd.OpenForm "differentform"
End If

Or in all versions of Access use the SysCmd function with
its acSysCmdGetObjectState argument/
 

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