Centering a form

G

Guest

Hello, I have a form In my database and its size is Width 9.375". But when I
open it, its always to the left. Is there anyway to center the form in
regular view without using the pop up option? I use this on different sized
PC screens and wanted it centered because it looks stuped on larger screens
being all the way to the left....

Thanks, Chad!
 
G

Guest

Open the form in design view and open the properties dialog. Simply set the
'Auto Center' property to True.
 
G

Guest

Daniel, thanks for the reply but I already have that set as yes. It will only
center if I set it as a pop up, which I dont want to do. Any other sugestions?

Thanks,
Chad
 
G

Guest

That is incorrect! It does not need to be set as a pop-up for the property
to work. I have dozens of db with not one form set as pop-up and the forms
all open centered in the screen once I set the 'Auto Center' property.
--
Hope this helps,

Daniel P
 
B

Baz

Daniel is quite right, the Auto Center property works on any form, not just
pop-ups. My guess is that your form is opening maximised, which will cause
it to fill the screen with it's background, with all the controls in the top
left.

The following statement in the form's Open event will force the form (and
all other open windows) from the maximised state to their "normal" size:

DoCmd.Restore
 
J

John Spencer

Or another possibility is that you are not closing the form after you
make the settings and then opening it. That is you are changing the
settings in design mode and switching the view from design mode.

When you work in design mode and switch to form view directly, the
form's position and size remain the same as when you are in design mode
UNTIL you close the form and open it directly into Form view.

The situation above frequently catches me until I do the classic
"forehead slap" and murmur "d'oohh"

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
G

Guest

Thanks everyone!! It is that I have it in maxamize.. I didnt know that would
prevent the form from being centered. I took the macro out and incerted the
DoCmd.Restore. the only problem is I liked it maximized. Oh well once again
thanks everyone for the responces!!
 
B

Baz

Hi Chad,

If you want all your controls etc. in the middle of the screen when the form
is maximised then you will need to design the form like that i.e. with lots
of space all around the controls. Trouble is, the correct displaying of the
form would then be highly dependent upon screen resolution. It's not a very
"Windows" way of designing things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top