Wrong Form Dimensions

emdiesse

Registered User.
Local time
Today, 16:10
Joined
Feb 1, 2006
Messages
36
I have create a form with specific dimensions whowever when I view it it is larger than it should be.

Whats wrong?
 
A form can't be smaller than the controls inside. For instance, let's say that you have two controls, side by side, like this:
[Text1][Text2]
If the left side of Text1 is at 0" and the right side of Text2 is at 5", then the whole form must be at least 5" wide. If you try to resize the form to be smaller, it will automatically be set back to 5" wide.
 
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
 

Users who are viewing this thread

Back
Top Bottom