Alternatives? DoCmd.Maximize, DoCmd.Restore

  • Thread starter Thread starter Richard Hollenbeck
  • Start date Start date
R

Richard Hollenbeck

I have a main form which I use like a switchboard and I want to keep it
maximized ALL THE TIME. All other forms I want to be auto-centered,
non-moveable, modal, dialogs in normal size. If I put DoCmd.Restore in the
Form_Open subroutine of the subsequent forms it also restores my main form.
I want the main form to stay maximized throughout the session. Is there a
better solution to my problem than some crazy combination of Maximize and
Restore? Even if not, is there a way I can keep the main form maximized all
the time without all the subsequent forms also being maximized?

Thanks.

Rich Hollenbeck
 
Richard said:
I have a main form which I use like a switchboard and I want to keep it
maximized ALL THE TIME. All other forms I want to be auto-centered,
non-moveable, modal, dialogs in normal size. If I put DoCmd.Restore in the
Form_Open subroutine of the subsequent forms it also restores my main form.
I want the main form to stay maximized throughout the session. Is there a
better solution to my problem than some crazy combination of Maximize and
Restore? Even if not, is there a way I can keep the main form maximized all
the time without all the subsequent forms also being maximized?


A neat trick that Albert Kallal Pointed out awhile back is
to set the Min/Max Buttons property to None for forms that
you do not want maximized.
 
Thanks. I went to that website and copied the code into a module, but I
don't know what to do with it.

Sub MaximizeRestoredForm(F As Form) So F represents my form name?

Do I do something like this?

Private Sub Form_Load()
MaximizeRestoredForm(WhateverMyFormsNameIs)
End Sub

Do I call it from my main form that I want to keep maximized? What
parameter do I put in there? It doesn't seem to want my forms name either
with or without quotes, and it doesn't like Me (the object, not the person).
 
I normally use the Activate Event of the Form I want to occupy the whole
Access Application window. You can simply use:

Call MaximizeRestoreForm(Me)

(I used this in A2K2.)
 
Back
Top