Forms DoCmd.Maximize | DoCmd.Restore

T

Tom

I have a main form that (when opened) is maximized (using the DoCmd.Maximize
OnOpen event).

On this form, I have a CommandButton that calls another form when being
clicked. Currently, this form is also maximized once being called via
clicking on the Command button. However, I don't really care about
automatically maximizing this form.

Now, when I close the subform (which has been called via command button) the
main form is (I guess) "RestoreForm" mode (not maximized nor mimized).
This is not what I want though. I want the view mode of the main form
unchanged.

So, my question is... how can I close the subform and then automatically
maximize the mainform again?


Thanks,
Tom
 
L

Larry Daugherty

Hi Tom,

You might try something like;

DoCmd.SelectObject A_FORM, "frmNewMeetingNotes"
DoCmd.Maximize

in the OnCurrent event of the form.

HTH
 
W

Wade

I have had a similar issue and I wish I knew more about
VB. I tried Larry's approach, but the main form remained
Restored after I closed the second form.

The only way I got mine to work was to make two Macros
and call each one for their function (mcroRestore and
mcroMaximize). Once you do this, in the Events,
choose "mcroRestore" under On Open and
choose "mcroMaximize" under On Close. It will do the job
and they can be easly referenced on multiple forms but I
know there is a better way.

Does anyone know how to force only one form to Restore
and keep the other forms Maximized? I'd like to get rid
of
 
T

Tom

Wade:

Got to hear that I am not the only one w/ this problem.

Larry's suggestion did fix my issue though... the only thing I had to
change to NOT to use the OnCurrent event... instead I put Larry's code
(certainly w/ my form name) into the OnClose event... that did the "trick".

HTH,
Tom
 
W

Wade

How dose the main form remain Maximized if it remains
open but placed behind the Restored form.

Every time I try this, after I close the Restored form,
the Main form stays Restored. I want it to stay
Maximized.

What am I missing?
 
T

Tom

Wade:

My "mainform" (maximized) calls the "Subform"... which also is openen in
Maximized view (I don' care how the subform is opened).

Until I used Larry's code, the Subform (when closed) caused the Mainform to
be viewed in Restore mode... this now is not the case any longer.

So, if okay, try to open your subform also in maximized view.

Hth,
Tom
 
G

Guest

Thanks Tom,

I guess my issue is a little different. I'm trying to
get a main form to remain Maximized. When a command
button is clicked on that main form, it calls up other
forms for quick reference. I'm trying to get those quick
reference forms to be restored while maintaining a
Maximized view of the main form.
 

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