Minimizing/Maximizing Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I have a form open and I maximize it all other forms will now maximize
and when you open a new form it will also be maximized. Is there somehow a
way to make it that when you maximize your current form no other forms will
be affected?
 
Playa said:
When I have a form open and I maximize it all other forms will now maximize
and when you open a new form it will also be maximized. Is there somehow a
way to make it that when you maximize your current form no other forms will
be affected?


No, that's the way the windows user interface works.

You could change the size of your form to take up most of
the available space without actually maximizing it. There
may be a better way to do it, but I had a play with this and
it seemed acceptable to me:

Dim lngMaxWidth As Long, lngMaxHeigth As Long

DoCmd.Echo False
DoCmd.Maximize
lngMaxWidth = Me.InsideWidth
lngMaxHeigth = Me.InsideHeight
DoCmd.Restore
DoCmd.MoveSize 0, 0, lngMaxWidth, lngMaxHeigth
DoCmd.Echo True

Be sure to integrate that into your error handling to
guarantee that Echo True will always be executed.
 
Unfortunately, because Access uses an MDI client window (like Word and
Excel) the maximized state applies to all child windows.

What you can do is, for the form you want maximized, add event procedures
for the Activate and Deactivate events. In Form_Activate, do a
DoCmd.maximize, and in Form_Deactivate put DoCmd.Restore.
 
Back
Top