Open form at its designed size?

B

Bill

What's the control property on a form that
forces the form to open at its designed size?
I've used some "Mickey Mouse" code to
make it not visible at Load time, issued a
DoCmd.Restore in the Open Event to get
it to it's nominal size and then made it visible
again. However, I can't believe that's how
it's done.

It seems really odd to me that I've never
encountered this before...........oh well.

Bill
 
R

Rick Brandt

What's the control property on a form that forces the form to open at
its designed size? I've used some "Mickey Mouse" code to make it not
visible at Load time, issued a DoCmd.Restore in the Open Event to get it
to it's nominal size and then made it visible again. However, I can't
believe that's how it's done.

It seems really odd to me that I've never encountered this
before...........oh well.

Bill

The form has a property named AutoResize. Set that to true.
 
R

Rick Brandt

Hi Rick,
It already is, and that was amongst my first thoughts. Bill

Do you mean making the window fit the size of the form sections or do you
mean "not maximized"? In Access if you maximize one object you maximize
them all so if you are opening your form from another that is maximized
then your form will be. The exception to that is to set the form's Popup
property to true.

You can run code...

DoCmd.Restore

....in the form's Open or Load events and that would also make it not
maximized.

If you are using Access 2007 then the default is for forms to use the new
Tabbed interface. That is very similar to being maximized and you would
have to change that setting if you want "normal" forms.
 
B

Bill

Rick Brandt said:
Do you mean making the window fit the size of the form sections or do you
mean "not maximized"? In Access if you maximize one object you maximize
them all so if you are opening your form from another that is maximized
then your form will be. The exception to that is to set the form's Popup
property to true.

You can run code...

DoCmd.Restore

...in the form's Open or Load events and that would also make it not
maximized.

If you are using Access 2007 then the default is for forms to use the new
Tabbed interface. That is very similar to being maximized and you would
have to change that setting if you want "normal" forms.

Rick,

My form was opened from the code sheet of another form
that is in fact maximised. And yes, I did mean that I wanted
my "troublesome" form to open "not maximized".

The "Mickey Mouse" code I posted earlier included a
DoCmd.Restore in the Open Event. However, I had to
include making the form "not visible" in the Load Event,
issuing the DoCmd.Restore in the Open and then
making it visible again to eliminate the screen flash.

Bottom line here is that I set the form's popup property
to yes and it now opens sized as desired.

Thanks for the help Rick,
Bill
 

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