Link to home
Start Free TrialLog in
Avatar of kkan
kkan

asked on

LOAD FORM in Access 2000 WITHOUT OPENING FORM

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.

Thanks

kan
Avatar of Volibrawl
Volibrawl

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.

Syntax

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

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

windowmode     One of the following intrinsic constants:
acDialog
acHidden
acIcon
acWindowNormal (default)
If you leave this argument blank, the default constant
(acWindowNormal) is assumed.
Avatar of kkan

ASKER

Volibrawl,

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?

Thanks

kan
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
ASKER CERTIFIED SOLUTION
Avatar of Volibrawl
Volibrawl

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kkan

ASKER

Volibrawl,

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 ...

bye..
Avatar of kkan

ASKER


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.

kan