Hello everyone,

My application consists of Three primary Master Forms. These forms each contain many subforms
so these Master Forms take more than a few seconds to load. I would like to load these forms into memory
when the Application is opened but I can't seem to find the LOAD Form command. Right now I use code in the On Open Property of My switchboard to OPEN the forms and then minimize them, but this looks messy.

What is the command or method to load these forms into memory when the application is loaded  without opening the forms.


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

To look less "messy", you could try opening your forms in Hidden mode instead of opening and then minimizing.
The OpenForm method carries out the OpenForm action in Visual Basic. For more information on how the action and its arguments work, see the action topic.


DoCmd.OpenForm formname[, view][, filtername][, wherecondition][, datamode][, windowmode][, openargs]

The OpenForm method has the following arguments......

windowmode     One of the following intrinsic constants:
acWindowNormal (default)
If you leave this argument blank, the default constant
(acWindowNormal) is assumed.
kkanAuthor Commented:

Thanks for your comments. Opening the form in hidden mode will work for my purposes. Also given your method and my current set up  I  need to open the form in Add mode AND Hidden mode.

If I understand you, the correct syntax to accomplish this would be:

DoCmd.OpenForm stDocName, , ,[ ,acAdd] [,acHidden]

Please excuse my as yet poor sense of syntax. If I am wrong would you be able to provide the correct syntax?


Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

Actually you don't need the brackets, Access help shows them that way meaning "optional".  Just include the appropriate number of commas:

DoCmd.OpenForm stDocName,,,,acAdd,acHidden
Here's a procedure I have used for slow opening, frequently used forms.

1. When the application loads, I have an autoexec macro that "opens" these forms "hidden".
2. I have command buttons that open the forms as needed.  When you execute a command to "open" the form, if it is already open (hidden) Access displays it (makes it visible)  quickly.  You can put your open parameters into that command:

DoCmd.OpenForm stDocName,,,,acAdd,acNormal

3. When you want to leave that form, INSTEAD of CLOSING it, you HIDE it again.  eg attach the following code to a command button (say CLOSE).

Forms!MyOpenForm.Visible = False

If all your forms are maximized, the forms just keep opening in front of each other and then "hiding" allowing the previous form to show through.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kkanAuthor Commented:

Many thanks!

This is exactly what I'm looking for...

The well earned points are yours
Glad to help  .. just click the accept answer bar on any of the comments and be sure to give me a grade ...

kkanAuthor Commented:

Sorry for the delay in accepting your answer. I thought I had already accepted when I had posted the last comment and only realized that I had not when I signed in today.

Thanks again and have a great week end.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.