Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms will not stay maximized

Status
Not open for further replies.

dragongunner0351

Programmer
Joined
Mar 16, 2006
Messages
104
Location
US
Hello all, I have a simple little macro that Maximizes the form window from the 'On Open' event fo the form. Works great, however whenever I open another form and then close it none of the other open forms are maximized, they are nearly maximized but not completely. does anyone know how I can keep all open forms maximized until i choose to close them?

Thanks in advance.
 
well the easiest is to set the on get focus event doCmd.Maximize so when ever you return to that form you will have it maximized and why do you call a macro in the first place type the same code docmd.maximize in the forms on load event

I will try my best to help others so will others do!!!!!
IGPCS
Brooklyn, NY
 
I agree with IGPCS about dumping the Macro; it's best to avoid them when possible, and you can type doCmd.Maximize as easily as the macro's name. You cannot use the GotFocus event of your form, however, unless your form either:

1) Has no controls that can receive focus (such as text
boxes, comboboxes, etc)

or

2) All such controls are Disabled

You can, however, place doCmd.Maximize in the Activate event of your form. This fires when the form first loads, and also whenever you return to the form from another form.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
After trying your suggestion I thought all was well but apparently not. Here is what is happening.

On the onGotFocus event I have doCmd.Maximize

When the form first loads all is well, being that it is maximized. Without closing the form, if I click the control to open another form it opens maximized. If I close the newly opened form using the "X" in the top right corner of the form the 1st form opened is no longer maximized.

Any other suggestions??
 
Thanks missinglinq I will try your suggestion and the MACRO is already gone.
 
Works great missinglinq thanks so much for your assitance
 
That's why we're all here!

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
on activate is what i meant i am sorry for not checking befor i post

but your welcome

Missingling how r u long didnt see you here?

I will try my best to help others so will others do!!!!!
IGPCS
Brooklyn, NY
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top