Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make form size unchanged?

Status
Not open for further replies.

Cowper

Programmer
Sep 18, 2002
29
AU
Hi, Could anyone help me with this problem?

How can I make the size of a form unchanged? The problem I have is whenever I open a form and then click a button to open a report. If I maximize the report and then close the report, the original form or database window will be maximized as well. It's very annoying because it changes the layout of the form. How can I fix this problem?

Any suggestions will be appreciated.

Cowper
 
Hi,

THere are probably many ways to do this, but I usually just set the form's border style = "None". I will not resize if the user maximizes or minimizes another form on top of it. However, I have to put in buttons to close the form...

HTH,

jbehrne If at first you don't succeed, call in an airstrike. - Murphy's Laws of Combat Operations
 
Hi, jbehrne

Thanks for your advise. It works beautifully.

Cowper
 
The other way to handle this is to issue a "Docmd.RESTORE" when you CLOSE the maximized guy. Here's the issue:

When you issue a "DoCmd.MAXIMIZE" , Access very kindly decides to maximize EVERY OPEN form/report/window that is resizeable, not just the one that has the focus.

However, just as kindly, when you issue a RESTORE, all those guys that just had a quick thyroid condition get cured.

Here's the process I generally follow, when I'm opening a report in preview mode:

1) Make the form invisible
2) Open the REPORT
3) Maximize the REPORT
4) On CLOSE of the Report, RESTORE
5) Make the form VISIBLE again

This eliminates a lot of flicker and screen redrawing.





Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top