Maximize

  • Thread starter Joe Frank via AccessMonster.com
  • Start date
J

Joe Frank via AccessMonster.com

Whenever I open a form over a form that is already open and then close the
form, the first form comes back in a reduced state. Whenever I open a report
in print preview over a form that is open and then close the reprort, the
first form opens in a reduced state. I always have to put DoCmd.Maximize in
the first form's Activate event. Why can't Access reactivate the first form
as maximized without having to be told? DoCmd.Maximize makes the first form
jump from unrestored to restored and just does not look like a smooth
transition.

Thanks!
 
W

Wayne Morgan

Once you maximize a child window in Access, all subsequent windows will also
be maximized until you tell one of them to restore, then they'll all be
restored. The exception to this is a Popup window or Dialog window.
 
J

Joe Frank via AccessMonster.com

I don't understand! Say Form A opens as a full screen form. Then I open Form
B as a full screen form. Form A is not closed. When I close Form B, Form A
appears again but in a reduced state. Whta can I do to get Form A to come
back full screen besides putting DoCmd.maximize in Form A's Activate event?

Wayne said:
Once you maximize a child window in Access, all subsequent windows will also
be maximized until you tell one of them to restore, then they'll all be
restored. The exception to this is a Popup window or Dialog window.
Whenever I open a form over a form that is already open and then close the
form, the first form comes back in a reduced state. Whenever I open a
[quoted text clipped - 10 lines]
 
W

Wayne Morgan

If you open form A maximized then form B maximized and you never un-maximize
form B, then when you close form B, form A should still be maximized unless
you have some code that is causing it to do otherwise. One thing to check,
is form B maximized or is it in restored view but just sized to fill the
screen area?

--
Wayne Morgan
MS Access MVP


Joe Frank via AccessMonster.com said:
I don't understand! Say Form A opens as a full screen form. Then I open
Form
B as a full screen form. Form A is not closed. When I close Form B, Form A
appears again but in a reduced state. Whta can I do to get Form A to come
back full screen besides putting DoCmd.maximize in Form A's Activate
event?

Wayne said:
Once you maximize a child window in Access, all subsequent windows will
also
be maximized until you tell one of them to restore, then they'll all be
restored. The exception to this is a Popup window or Dialog window.
Whenever I open a form over a form that is already open and then close
the
form, the first form comes back in a reduced state. Whenever I open a
[quoted text clipped - 10 lines]
 
J

Joe Frank via AccessMonster.com

Thanks for responding back, Wayne!

What I am seeing does not follow what you are saying. Neither FormA or FormB
is a popup form. I use the form wizard or just select form design to
initially create the forms. Just thinking here, the form wizard nor form
design does not produce a form that fills the screen. I have to always pull
down the bottom border. Is this normal? Are the forms I am creating maximized?
They do fill the screen when I go to form view!

Anyway, once the forms are created, I use Docmd.Openform to open FormA. It
fills the screen so I presume it is maximized. The I use DoCmd.openform to
open FormB. It also fills the screen so I presume it too is maximized. I
never un-maximize FormB. When I close FormB, FormA appears but it is reduced.
I seem the same behaviour with a report. I open FormA with DoCmd.OpenForm.
Then I open a report in print preview. When I close the report, FormA appears
but it is reduced here too.

It seems to me I should not have to put DoCmd.Maximize in the Activate event
of every form so if I open another object on top of the form, the form will
appear maximized when it gets the focus again.

I have always had this problem in Access97, 2000 and XP! I am thinking that
maybe I am not building the forms right initially or that I have always had
some setting set wrong!!

Hope you can shed light on this for me!!

Wayne said:
If you open form A maximized then form B maximized and you never un-maximize
form B, then when you close form B, form A should still be maximized unless
you have some code that is causing it to do otherwise. One thing to check,
is form B maximized or is it in restored view but just sized to fill the
screen area?
I don't understand! Say Form A opens as a full screen form. Then I open
Form
[quoted text clipped - 14 lines]
 
R

Rick Brandt

Joe Frank via AccessMonster.com said:
Thanks for responding back, Wayne!

What I am seeing does not follow what you are saying. Neither FormA or FormB
is a popup form. I use the form wizard or just select form design to
initially create the forms. Just thinking here, the form wizard nor form
design does not produce a form that fills the screen. I have to always pull
down the bottom border. Is this normal? Are the forms I am creating maximized?
They do fill the screen when I go to form view!

Anyway, once the forms are created, I use Docmd.Openform to open FormA. It
fills the screen so I presume it is maximized. The I use DoCmd.openform to
open FormB. It also fills the screen so I presume it too is maximized. I
never un-maximize FormB. When I close FormB, FormA appears but it is reduced.
I seem the same behaviour with a report. I open FormA with DoCmd.OpenForm.
Then I open a report in print preview. When I close the report, FormA appears
but it is reduced here too.

It seems to me I should not have to put DoCmd.Maximize in the Activate event
of every form so if I open another object on top of the form, the form will
appear maximized when it gets the focus again.

I have always had this problem in Access97, 2000 and XP! I am thinking that
maybe I am not building the forms right initially or that I have always had
some setting set wrong!!

Hope you can shed light on this for me!!

Perhaps you should consider whether the goal is worthwhile instead of how to
achieve it. Is there some particular reason that you want all of your forms to
be maximized? Most developers don't struggle with this problem because they
don't try to run all forms maximized in the first place.
 
J

Joe Frank via AccessMonster.com

I did not mean to give the impression that I want all the forms to be
maximized. There are many popup forms in the database. A common place where
this problem occurs is the main screen of the database. The database opens to
this screen and all forms are opened on top of this screen from a custom menu.
I always have to put DoCmd.Maximize in the Activate event of this opening
screen. Any full screen form that launches a report always has to have DoCmd.
Maximize. And for every full screen form there's always the possibility that
another form will be launched on top of it from the custom menu.

Rick said:
Thanks for responding back, Wayne!
[quoted text clipped - 22 lines]
Hope you can shed light on this for me!!

Perhaps you should consider whether the goal is worthwhile instead of how to
achieve it. Is there some particular reason that you want all of your forms to
be maximized? Most developers don't struggle with this problem because they
don't try to run all forms maximized in the first place.
 
R

Rick Brandt

Joe Frank via AccessMonster.com said:
I did not mean to give the impression that I want all the forms to be
maximized. There are many popup forms in the database. A common place where
this problem occurs is the main screen of the database. The database opens to
this screen and all forms are opened on top of this screen from a custom menu.
I always have to put DoCmd.Maximize in the Activate event of this opening
screen. Any full screen form that launches a report always has to have DoCmd.
Maximize. And for every full screen form there's always the possibility that
another form will be launched on top of it from the custom menu.

I guess I'm struggling to understand why you want *any* form to be maximized.
The only thing I ever maximize in Access is a Report preview.
 
W

Wayne Morgan

Rick, it depends on your screen resolution. I'll agree with you, I hate
things maximized because I usually have several things open at once and that
goes for MDI windows also. However, it takes a high screen resolution to do
this successfully.
 
W

Wayne Morgan

Joe,

The form is probably created with the AutoSize property set to Yes. This
will cause the form's window to "fit to size" the form's dimensions as you
would see them in design view. Yes, while in design view, you usually have
to play with the window borders a little to see the whole form. Also, as you
switch from design view to form view, the behavior is not the same as when
you first open the form. Instead, the design view window size will be
retained (instead of AutoSize) unless there is some code that changes it as
the form opens in form view. Now, if your form is large enough and the
Access window is sized so that when the form sizes itself to fit, it may be
filling the screen. Check the buttons at the top right of the form to see if
it is maximized or restored but stretched. The middle of the 3 buttons is
the indicator for this.

--
Wayne Morgan
MS Access MVP


Joe Frank via AccessMonster.com said:
Thanks for responding back, Wayne!

What I am seeing does not follow what you are saying. Neither FormA or
FormB
is a popup form. I use the form wizard or just select form design to
initially create the forms. Just thinking here, the form wizard nor form
design does not produce a form that fills the screen. I have to always
pull
down the bottom border. Is this normal? Are the forms I am creating
maximized?
They do fill the screen when I go to form view!

Anyway, once the forms are created, I use Docmd.Openform to open FormA. It
fills the screen so I presume it is maximized. The I use DoCmd.openform to
open FormB. It also fills the screen so I presume it too is maximized. I
never un-maximize FormB. When I close FormB, FormA appears but it is
reduced.
I seem the same behaviour with a report. I open FormA with DoCmd.OpenForm.
Then I open a report in print preview. When I close the report, FormA
appears
but it is reduced here too.

It seems to me I should not have to put DoCmd.Maximize in the Activate
event
of every form so if I open another object on top of the form, the form
will
appear maximized when it gets the focus again.

I have always had this problem in Access97, 2000 and XP! I am thinking
that
maybe I am not building the forms right initially or that I have always
had
some setting set wrong!!

Hope you can shed light on this for me!!

Wayne said:
If you open form A maximized then form B maximized and you never
un-maximize
form B, then when you close form B, form A should still be maximized
unless
you have some code that is causing it to do otherwise. One thing to check,
is form B maximized or is it in restored view but just sized to fill the
screen area?
I don't understand! Say Form A opens as a full screen form. Then I open
Form
[quoted text clipped - 14 lines]
 
R

Rick Brandt

Wayne Morgan said:
Rick, it depends on your screen resolution. I'll agree with you, I hate things
maximized because I usually have several things open at once and that goes for
MDI windows also. However, it takes a high screen resolution to do this
successfully.

But surely that only requires that I maximize the Access window, not all of my
forms. If a non-maximized form won't fit in a maximized Access window then
maximizing the form is only going to add a few pixels more. Even if those few
pixels are worthwhile that is a decision for the user. It does not justify the
developer adding code so that forms open pre-maximized.
 
W

Wayne Morgan

I agree with you. Where I've seen it is when the user does run the Access
window maximized. They then want each form maximized in the window also. It
drives me nuts.
 
J

Joe Frank via AccessMonster.com

Rick, thanks for sticking with me on this!!

Questions ---
1. By 'Access Window' do you mean the database window where you can go to
the tables, queries, forms, etc?

2. How do you maximize the Access window programatically?

3. Bottom line -- how do you personally design new forms so that later other
forms can be opened after you open a form and when you successively close the
forms each previous form fills the entire screen below the custom menu?
 
J

Joe Frank via AccessMonster.com

Wayne, thank you for staying with me on this!

Questions ---
1. Please explain "Access window is sized so that when the form sizes itself
to fit". By the "Access Window" do you mean the database window where you can
go to tables, queries, forms, etc? How do you size the "Access Window"? Do
you do it programatically?

2. To be sure I understand, when I look at the middle button at the top
right of the form, what do I look for to see if the form is maximized or
restored but stretched?

3. Bottom line -- how do you personally design new forms so that later other
forms can be opened after you open a form and when you successively close the
forms each previous form fills the entire screen below the custom menu?

Thanks!!


Wayne said:
Joe,

The form is probably created with the AutoSize property set to Yes. This
will cause the form's window to "fit to size" the form's dimensions as you
would see them in design view. Yes, while in design view, you usually have
to play with the window borders a little to see the whole form. Also, as you
switch from design view to form view, the behavior is not the same as when
you first open the form. Instead, the design view window size will be
retained (instead of AutoSize) unless there is some code that changes it as
the form opens in form view. Now, if your form is large enough and the
Access window is sized so that when the form sizes itself to fit, it may be
filling the screen. Check the buttons at the top right of the form to see if
it is maximized or restored but stretched. The middle of the 3 buttons is
the indicator for this.
Thanks for responding back, Wayne!
[quoted text clipped - 45 lines]
 
R

Rick Brandt

Joe Frank via AccessMonster.com said:
Rick, thanks for sticking with me on this!!

Questions ---
1. By 'Access Window' do you mean the database window where you can go to
the tables, queries, forms, etc?

No, I mean the main application window.
2. How do you maximize the Access window programatically?

DoCmd.RunCommand acCmdAppMaximize
3. Bottom line -- how do you personally design new forms so that later other
forms can be opened after you open a form and when you successively close the
forms each previous form fills the entire screen below the custom menu?

I never try to make my forms fill the entire screen so "how to do it" has never
been an issue. The form needs to be exactly big enough so that all of the
controls are visible. I see no point in making it larger than that.
 
W

Wayne Morgan

1) The Access Window is the main Access Application window. The one that is
there if you have no database open. Rick's response gave you the built-in
command to maximize that window. For other manipulation of the window, you
would need to use the Windows APIs. Of course, you can do it with the mouse
also, as you would any window.

2) The middle button should be a double window symbol, not a single window.

3) By "filling the entire screen" I assume you mean the screen area inside
the Access window itself. Whether or not that fills the entire screen is a
separate action (see #1). One option would be to issue a DoCmd.Maximize in
the Close event of the form you're closing.

--
Wayne Morgan
MS Access MVP


Joe Frank via AccessMonster.com said:
Wayne, thank you for staying with me on this!

Questions ---
1. Please explain "Access window is sized so that when the form sizes
itself
to fit". By the "Access Window" do you mean the database window where you
can
go to tables, queries, forms, etc? How do you size the "Access Window"? Do
you do it programatically?

2. To be sure I understand, when I look at the middle button at the top
right of the form, what do I look for to see if the form is maximized or
restored but stretched?

3. Bottom line -- how do you personally design new forms so that later
other
forms can be opened after you open a form and when you successively close
the
forms each previous form fills the entire screen below the custom menu?

Thanks!!


Wayne said:
Joe,

The form is probably created with the AutoSize property set to Yes. This
will cause the form's window to "fit to size" the form's dimensions as you
would see them in design view. Yes, while in design view, you usually have
to play with the window borders a little to see the whole form. Also, as
you
switch from design view to form view, the behavior is not the same as when
you first open the form. Instead, the design view window size will be
retained (instead of AutoSize) unless there is some code that changes it
as
the form opens in form view. Now, if your form is large enough and the
Access window is sized so that when the form sizes itself to fit, it may
be
filling the screen. Check the buttons at the top right of the form to see
if
it is maximized or restored but stretched. The middle of the 3 buttons is
the indicator for this.
Thanks for responding back, Wayne!
[quoted text clipped - 45 lines]
 
J

Joe Frank via AccessMonster.com

<<issue a DoCmd.Maximize in the Close event of the form>>

We're back to where we started! DoCmd.Maximize is what I am asking if it can
be avoided where forms are expected to open over top other forms. Say you
need to create FormA, FormB and FormC and you want to design the forms so
that when any one of them are open you can open either of the other two. And
when you close whichever of the two you opened, the first form would appear
as the same size as when you first opened it. "Same size" means what you get
if you have DoCmd.Maximize in the Activation event of the first form. None of
these are pop-up forms. How would you design these forms so that that can
happen? Do you have to include DoCmd.Maximize to make it happen?




Wayne said:
1) The Access Window is the main Access Application window. The one that is
there if you have no database open. Rick's response gave you the built-in
command to maximize that window. For other manipulation of the window, you
would need to use the Windows APIs. Of course, you can do it with the mouse
also, as you would any window.

2) The middle button should be a double window symbol, not a single window.

3) By "filling the entire screen" I assume you mean the screen area inside
the Access window itself. Whether or not that fills the entire screen is a
separate action (see #1). One option would be to issue a DoCmd.Maximize in
the Close event of the form you're closing.
Wayne, thank you for staying with me on this!
[quoted text clipped - 42 lines]
 
W

Wayne Morgan

If you open the FormA maximized then open FormB, unless you have some code
to change it, FormB will also open maximized. If you restore (unmaximize)
and don't remaximize FormB before you close it, then FormA will no longer be
maximized. However, if FormB is maximized when you close it, then FormA will
also be maximized after FormB closes.

You can't open FormA maximized and FormB not maximized and keep FormA
maximized unless you open FormB as a dialog box or popup. This goes for the
database window also. It will be maximized or restored, just as the forms
are. If you are showing the database window and unmaximize it, you will also
unmaximize the forms. If you have a switchboard form that you go back to
between opening FormA and FormB and the switchboard form isn't maximized (it
should be if FormA was opened maximized unless you have code to restore the
switchboard when you go to it), then that will also unmaximize the other
form(s).
 

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