Checking if form is hidden

S

StuJol

i have a form that is sometimes hidden and sometimes visible.

i know you can use "CurrentProject.AllForms("frmWorkOrders").IsLoaded" to
see if a form is open, but even with the form hidden this code returns a TRUE.

is there a way to see using vb if a form is hidden!
 
B

Brendan Reynolds

Check the Visible property of the form ...

Public Sub TestSub2()

DoCmd.OpenForm "frmTest"
Debug.Print Forms("frmTest").Visible
DoCmd.Close acForm, "frmTest"
DoCmd.OpenForm "frmTest", , , , , acHidden
Debug.Print Forms("frmTest").Visible
DoCmd.Close acForm, "frmTest"

End Sub
 

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