Why do forms sometimes minimize on their own?

R

Robert

I have 2 forms. The first one is opened with docmd.maximize. I click on a
button on this form which opens a second form. I do some stuff and then I
close the second form. The first form is still there but it appears as if
it has shrunk some and is not maximized in the database pane. How can I
correct this?

Robert
 
B

Baz

The standard Windows behaviour for an MDI application (which is what Access
is) is that *all* windows are maximised, or they are *all* 'normal'. If you
'restore' a maximised window to it's 'normal' size, then all other maximised
windows will automatically be restored at the same time.
 
R

Robert

So how do I correct it? My form appears to go to normal just by opening
another form. All of my forms have docmd.maximize in the on open event.
 
B

Baz

Does the second form open maximised? Is the first form "restored" as soon
as the second form opens, or does it happen later? If you are not
"manually" restoring any windows, have you got some code somewhere that is
doing it i.e. a DoCmd.Restore statement?

Generally you can't rely on anything staying maximised, it might be better
to size your forms so that they open in a suitable size in their "normal"
state.
 
R

Robert

Yes, yes, and no. (AFAIK)

There doesn't appear to be any restoring of any form. I solved the problem
by putting a maximize in the On Activate event, though I don't know why it's
necessary.
 

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