Solved

LOAD FORM in Access 2000 WITHOUT OPENING FORM

Posted on 2002-04-10
8
246 Views
Last Modified: 2007-12-19
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
0
Comment
Question by:kkan
  • 5
  • 3
8 Comments
 
LVL 9

Expert Comment

by:Volibrawl
ID: 6931255
To look less "messy", you could try opening your forms in Hidden mode instead of opening and then minimizing.
0
 
LVL 9

Expert Comment

by:Volibrawl
ID: 6931273
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.
0
 

Author Comment

by:kkan
ID: 6931410
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
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 9

Expert Comment

by:Volibrawl
ID: 6931583
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
0
 
LVL 9

Accepted Solution

by:
Volibrawl earned 50 total points
ID: 6931624
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.
0
 

Author Comment

by:kkan
ID: 6932266
Volibrawl,

Many thanks!

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

The well earned points are yours
0
 
LVL 9

Expert Comment

by:Volibrawl
ID: 6932425
Glad to help  .. just click the accept answer bar on any of the comments and be sure to give me a grade ...

bye..
0
 

Author Comment

by:kkan
ID: 6938772

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
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question