How stop window from resizing?

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

Guest

I have a form that when a button is pressed opens another form.
When this second form is closed, the first form invariably resizes. For
instance, if I maximize the first form before pressing the button, when I
come back the form is no longer maximized. Is there any way to ensure that
the first form is redisplayed in exactly the size and position it was when
the button was pressed. I have played around with various settings and code
but have not been able to find anything that works reliably.

Thanks.
 
In the CLOSE event of your form insert the line

docmd.OpenForm "YourForm" etc

You can cut and paste the form open line line from the button wizard if you
wish. Even though the form you want is already open, this will force it to
resize to its original dimensions when the current form has closed.
 
If the second form's modal and popup properties are set to Yes, and you open
the form in Window mode Dialog, you will not have the problem of resizing
the first form.

I'm not sure Dialog would work for your second form because it does have
limitations, but if it is a simple form such as asking for Print or Preview,
it might do the trick.
 
Back
Top