How to maintain form size

vaughn

Registered User.
Local time
Today, 15:03
Joined
Aug 29, 2003
Messages
11
I have used the docmd.restore when closing a maximized report to keep the form from maximizing... but when I view a data sheet from my form then close the data sheet my form is maximized! Any help out there??:(
 
I'm not exactly sure what problem you are having but I'm thinking it might be that your Form, from which you launch a report or reports, is maxed after viewing a report which has been maxed. I used to have that problem but it disappeared when I set my report and form Auto Resize format properties to No. Along with that I manually resized my Reports to the size I like to view them at,and saved them of course. Now when I open a report it is always easily readable without the need to max it and always opens the exact same size. I hope this helps.
 
Last edited:
Searching the forum is a great way to discover and learn the answers to your Access programming questions.

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
 
Thanks...but

I have also taken care of the problem when viewing a report, but if I view a query datasheet, I don't want to tell the users they have to size the window... I just want the form to be a specific size when they close the datasheet view window.
 

Users who are viewing this thread

Back
Top Bottom