Full Version: How To Maximize All Forms When Database Is Opened
UtterAccess Forums > Microsoft® Access > Access Forms
Is there a single command which will maximize all forms when my database is opened?
Odon't want to have to write "docmd.maximize" for each form.
There must be a more efficient way to do this.
Hi Dave,
nce issued, DoCmd.Maximize does affect all subsequent forms. Just make sure you don't have any other code that modifies the form size in any other events.
Just my 2 cents...
In addtion to the above tip,
There is option in 2007/2010 to change this.
So, for 2007/2010, you can set the application overall to run in tabbed mode. This means that all windows will be sized to that of the Access application window. In fact, it means users will never in fact see that background window.
Thus in 2007/2010 you can simply change the application mode in file->options current database to tabbed document mode, and the result will be all forms open maxed without any more efforts on your part.
For previous versions, I don't believe that global option exists, but as pointed out, once one form is max, all other tend to follow that setting.
So, you might get away just opening the main form/switchboard maxed, and then all forms after that should follow. This will depend on how some forms are setup, but as suggested, you might find out that just maxes the one starting form will work for you without additional codeing for each form.
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
Also in addition, note that this is part of the Windows MDI (Multiple Document Interface) rather than anything Access-specific. It is the same thing as having two excel documents opening an maximizing one of them (which does it for all), or the VBE window and maximizing a code module window, or a multiple word documents open in a single instance of word, etc.
Personally I've found it to be quite the nuiscance when working with access objects.
edit: also note that it is possible to maximize only a single form to it's client window via the windows API. See www.lebans.com and look for MaximizeToClient. I use this for my user's home form so the rest of the form's aren't maximized. (this may be slightly different in 2007/2010, haven't played around enough with them to know for sure)
Thank you for your advice and help.
Hi Dave,
We are all happy to help. Good luck with your project.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.