Opening Smaller Windows

Anthony George

Registered User.
Local time
Today, 03:23
Joined
May 28, 2004
Messages
105
Hi Guys

Im' Pulling my hair out at the moment trying to get my forms to re-open in the smaller view after ive closed them.

Ive tried Cmd.movesize which works ok occasionally but when you turn your back the next time the darn thing opens maximised.

Is there a simple command to get the window to open in the smaller mode like DoCmd.Maximize does for the full size mode?

I would be much obliged for any help with this one.

Thanks in advance for any help offered

All the very best for now

Tony
 
you might want: Restore.

Docmd.RunCmd acCmdSizeToFitForm is also helpful (On Load event). this will resize your form to the form's written dimensions even if you've stretched it wide open while in design mode.
 
Last edited:
Hi Wazz,

You beat me too it.....

Hi Anthony George,

Attached is a database with your needs?

DoCmd.Restore does the trick!!!

That of course all depends on how you save the form sizes in thier original size, not maximized?

Robert88
 

Attachments

Thank's For Help

Hi Waz and Robert

That works just fine

Thank's for all of your help, it was very much appreciated

All the best for now

Tony
 
I prefer to force the exact size I want my forms to be in using this code in the forms OnOpen event...
Code:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
    
    'just for testing
    MsgBox "InsideHeight = " & InsideHeight & vbCrLf & vbLf & "InsideWidth = " & InsideWidth
    
    InsideHeight = 5450 'twips is the unit of measurement
    InsideWidth = 7870
    
Exit_Form_Open:
    Exit Sub
    
Err_Form_Open:
    MsgBox Err.Number & " - " & Err.Description
    Resume Exit_Form_Open
    
End Sub
 
Thank's for the code

Hi G Hudson

Thank's for the code it is really neat

Kindest regards

Tony
 

Users who are viewing this thread

Back
Top Bottom