Resize Form

PuJo

Oilfield Trash
Local time
Yesterday, 19:57
Joined
Oct 12, 2006
Messages
16
In my db, I have a form set to open on start.
Is there anyway to set this to auto resize Maximize? (if you know what I mean)
Thanks again,
Pujo

"On The Bayou"
 
In your form's On Open event put:

Code:
DoCmd.Maximize

Now, just be aware, in case you didn't know, that if you maximize one object the rest of the objects maximize (all forms, reports, database window). If you want to reset it so they aren't, on the form's On Close event put:

Code:
DoCmd.Restore
 
put this in the forms open event

Private Sub Form_Open(Cancel As Integer)
Application.RunCommand acCmdAppMaximize
Application.RunCommand acCmdDocMaximize
End Sub

the first line expands the access app
the second expands the current form
 
You guys are great!!!!!
Work like a charm.

Have a great weekend.
God Bless,
Pujo


"On The Bayou"
 
Gemma what are the pros and cons of using the method you have suggested and the method suggested by Boblarson?
 
Last edited:
Both of them should work fine. Mine is something I use in all of my reports since I don't like other maximized objects.

Gemma's code maximizes the Access window first and then the object. However, there was no mention of restore, which is what I use to come back to non-maximized forms after closing the report.

It's all a personal preference.
 
Thanks Bob, yours is the method I use. Iwas just interested if there was any benift in the method outlined by Gemma.
 
i never maximize forms, because i prefer to see bordered forms where possible. I just knew the commands were there.

I actually save and restore the positions and screen locations of forms in the registry using standard access commands, on the load and close events, so that when users re-open forms they return to their last location.
 
I always maximize everything when I open a database by using the Autoexec macro.

You've got this big screen. Why just use a portion of it?
 

Users who are viewing this thread

Back
Top Bottom