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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

un-maximize a form 1

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
I have a form that opens from a switchboard. well when it opens i have Docmd.Maximize

When the form closes it opens back up the switchboard.

But it will Maximize the switcboard.

How can i turn the Maximize off after the form closes.
I've tryed this also and it wont work :

DoCmd.OpenForm "main Switchboard", acNormal, , , acFormEdit, acWindowNormal


Thanks DVannoy
A+,Network+,CNA
dvannoy@onyxes.com
 
Set your switchboard to be a dialog box rather than a sizable form and you won't have this problem.

Joe Miller
joe.miller@flotech.net
 
I am having a somewhat similar problem. I have sort of a switchboard form with buttons that open up other forms. I want the switchboard to be maximized the entire time it is open. When I hit a button to open another form, I don't want the new form to be maximized. I took your recommendation above and made this form a dialog box, but it always opens up maximized. Any ideas? Thanks!
 
There is an even simpler solution. When you open the new form just before your open form command add
DoCmd.restore
this resets the form size allowing your new form to open at the correct size.
 
This opens the new form the right way, but it restores my switchboard to a non-maximized state. :(
 
Is there a way to attach the DoCmd command to that specific form? Here is some of my code:

Private Sub cmdOpenSales_Click()
DoCmd.Restore
DoCmd.OpenForm SalesForm
End Sub

I tried using [Forms]![SalesForm].DoCmd.Restore, but that didn't seem to work.
 
Make the switchboard maximise when it is activated, that way it will always be maximised when it is being worked with but the new forms will open at the right size.Maximise is an insidious piece of code that just keeds working until told not to as far as I can see.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top