Set the height of a form in cm

Islwyn

Registered User.
Local time
Today, 18:55
Joined
Aug 29, 2011
Messages
28
Probably a very simple solution, but I've search the forms threads and nothing seems to be coming up:

How do I change the default height of a form using code? Eg - to set the width and height of a form showing continuous records to 17cm.

Thanks

Is
 
Measurements in Access are in Twips (Twentieth of an Imperial Point.) There are 72 Points in an Inch. The unit is held in a Long datatype.

There are 567 Twips in a centimetre.

Me.Height = 17 * 567
Me.Width = 17 * 567
 
Thanks GalaxiomAtHome.

This may sound a stupid question to experienced users, but where do I place the code?
 
In the OnLoad Event of the form.
 
Thanks. I'm getting a "Method or data member not found" error message in the VBA debugger window when I place this code in Form_Load(). Here is the code:

Private Sub Form_Load()
Me.Height = 19 * 567
End Sub

What am I doing wrong?

Thanks
 
Hmmm. Forms have Width Property but no Height. Wonder why?

Try using the Move Method (Access 2003+).
This is for the positioning of the Window itself.

Me.Move (LeftValue, TopValue , WidthValue, HeightValue)

Values in Twips.
 
NB: Each section in a form has a Height property. Using the Move method does the resizing for you.
 

Users who are viewing this thread

Back
Top Bottom