Form Invisible

Irie

Registered User.
Local time
Today, 15:42
Joined
Jul 12, 2001
Messages
27
I have searched this forum for previous posts, and the microsoft support site but have been unable to find anything about making a form invisible.
The reason behind this, is that I have a form which has a series of command buttons that leads user onto other forms. When selecting a form I wish this main for to be made invisible. And when the other forms closed, made visible.
How is this done?
Thnx
 
You should be able to make a form invisible but only if it does not have the focus.

Try making the sub-form visible, then giving the focus to the first field on the sub-form. After that, use

DoCmd.SelectObject, acForm, me.Name, true
DoCmd.Minimize
Me.Visible = false

Then when you close the other form, you have to reverse the process. Select the other form by its name, make it visible, maximize it, and select an appropriate control for the initial point of focus.

Forms![SwitchBoard].visible = true
docmd.selectobject adform, "Switchboard", true
docmd.maximize
forms![Switchboard]![first-control].setfocus
 
Doc_Man, thankyou for your response..
I have been unable to get your suggestion to work, probably because what I am trying to make invisible does not involve any sub-forms.
For the first bit of code, should I put this in the on_open event of the form I have just opened from the main form??
I will keep trying your suggestion and see what I come up with, but any other suggestions would be of help.
Thnx
 
Thnx Doc_Man

I actually did get it to work, I just didn't need as much code.

All I did was use the code:

Forms![search].visible =false

Thnx
 

Users who are viewing this thread

Back
Top Bottom