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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hidden Form

Status
Not open for further replies.

ptuck

MIS
Aug 8, 2003
130
US
Okay..I am giving up. I have a form that I want to be hidden when access is open. I am setting the visible property to false, but the only what this works is if I open the form from design view. In other words, the form has to be loaded before I can hide it. I have tried to setfocus then hide it from the load event, but not luck. What am I missing????

Thanks for the help,
Paul
 
Perhaps dependent on how you open it.

If you do it thru the openform method of the docmd object:

[tt]docmd.openform "myform",,,,,achidden[/tt]

should do (windowmode arguement)

The same option is available if you use for instance an AutoExec macro. Try Hidden as Window mode.

Roy-Vidar
 
I helped develop an application that uses this same process. What worked for us (Access 2000) is having the start up menu default to opening the form you want hidden. On Activate event of that form, we have code to open another form - in our case a 'Main Menu' switchboard-type form. Immediately after that line of code, we have another line of code that sets the visible property of the first form to false. Result is our 'Main Menu' form is displayed but our original form is hidden.

This works for us - hope this helps.
 
Well....one easy solution is to create a startup form. In the On Load event of the startup form, you could put some code like the following:

DoCmd.OpenForm "frmHiddenForm", acNormal, , , , acHidden
DoCmd.OpenForm "frmMain", acNormal
DoCmd.Close acForm, Me.Name

This will hide the form you want hidden, bring up another form, then close the startup form. Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top