Keeping Forms the same size

pepegot

Registered User.
Local time
Today, 12:11
Joined
Feb 20, 2006
Messages
39
When I open a Form, it appears in the proper size. Then, I go and open a Report, which is a DoCmd.Maximum on open. This works well. The report is enlarged. Now, when I go to open a form, the size of the form is max.
I tried Borderline dialog, fit window, DoCmd.MoveSize, and a couple of other things, but I cannot get those forms to keep their original size-they blow up!
How can this be accomplished?
 
Searching the forum is a great way to discover and learn the answers to your Access programming questions.

Did you try this command?
Code:
DoCmd.Restore

I prefer to force the exact size of my forms using this 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
 

Users who are viewing this thread

Back
Top Bottom