Change form size in VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to adjust the size of a form for the best fit of controls that will be
visible when the form opens. My form is pop-up, model and dialog border.
The following code in the Open event of the form has no effect.

Me.Detail.Height = 2700
Me.Width = 3240
Help please.
 
I want to adjust the size of a form for the best fit of controls that will be
visible when the form opens. My form is pop-up, model and dialog border.
The following code in the Open event of the form has no effect.

Me.Detail.Height = 2700
Me.Width = 3240
Help please.

You adjust the size of the entire form, not just a section.
Look up the MoveSize method in VBA Help.

Docmd.MoveSize , , 3*1440, 2 *1440

Will set the form width to 3" and it's height to 2"
All measurements are in Twips (1440 per inch).
 
Back
Top