Form size problems.

ellenr

Registered User.
Local time
Today, 11:02
Joined
Apr 15, 2011
Messages
400
Access 2010. I am reworking an old db and trying to make it more professional looking. There are numerous small input screens that used to open here and there and I want to center them. I begin by opening a background screen that I wish to be maximized (and stay that way). OnLoad DoCmd.Maximize maximizes properly. I then do a macro (OnOpen event) to open the MainMenu - relatively small form that I want centered. I don't want it to be a popup because there are numerous reports that are available as print previews, and they end up behind the popups. When the opening form executes the OnOpen event to open the small Mainmenu, it changes to small screen and lowers itself below the edge of the MainMenu form. Now I have changed the settings to the following: the background has AutoCenter, AutoResize and Fit to Screen all set to "no" and the MainMenu has AutoCenter set to yes and the other two set to no. This leaves the opening form maximized, but opens the Mainmenu behind it. I have experimented with combinations of these settings to no avail. In simple language I just want to put a small form in the middle of a maximized one. There must be a way! Thanks for any help.
 
I've had this sort of problem in the past. If I remember correctly I made the smaller form a centered popup. In the code of each button on that form that opened a report in preview I used code to set the forms visible property to false. Something like:
Me.Visible = False
In the On Close event of the report I had code to make the form visible again. Something like:
Forms!SmallFormName.Visible = True
 
I had set up all of the various screens that way and it looked great except that the only way I could figure to get the opening MainMenu to center was to do it as a popup form since it wouldn't open on top of the background colored maximized form when I did it as a centered non-popup. So now, the only way to do what I want to do is to make each popup plus the MainMenu popup invisible for every single print preview. What a pain! Just wish there were a way to set the print preview to be a popup.
 
Just wish there were a way to set the print preview to be a popup
I was using A2003 when I needed to do this. Can't remember if reports could be set to Pop Up then but they can in A2013 :)
 
The other option would be to have the secondary form as a sub form in the middle of your main form , and make it visible / invisible as required.
You could even swap in and out various sub forms in the same control?
 
Wow, missinglinq! Sure do wish someone had told me this sooner--you solved all of my problems! Many thanks.
 
The things that so many people, even many who have used Access for years, don't understand, is that it is a hugely complex application and that VBA for Access is a hugely complex language! And you can work in it for years and years and not use/be aware of all of its features!

Glad we could help!

Good luck in your conversion project!

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom