Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hide a form

Status
Not open for further replies.

Mary10k

IS-IT--Management
Nov 8, 2001
103
US
How do I hide a sub form? I have a cmd button on my main form which takes me to the sub form. I would like the main form to hide once the sub form is oppened. I tried Me.Hide and that is not working. Any suggestions?
 
Hi!

In Access the subform is considered to be a control on the main form. So, if you are in the subform, you can't hide the main form because it still has the focus. What are you trying to accomplish, there may be another way to do it.

hth Jeff Bridgham
bridgham@purdue.edu
 
Actually, this isn't a sub form. The focus is opening a new form. For example: my open form button on the switchboard opens the new form, but I would like the switchboard to close once the new form is open.
Thank you.
 
Try using Me.Visible = False Remember though.. the form is still in memory. You can unhide it using the menu (Window/Unhide), by referencing it by name (formName.Visible = True) or by re-opening the form. You need to remember that the forms load event will not be processed when it is Re-opened from the hidden state. This may or may not be a problem, depending on your form.

To completely unload a form, I usually use the DoCmd.Close. This method doesn't work to well though if you are doing something with another form at the same time. -Dustin
Rom 8:28
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top