Form Size and Location

  • Thread starter Thread starter bmorganh
  • Start date Start date
B

bmorganh

I have created a Master Form which opens when I first open a database. On
this form are several command buttons that when selected open other forms
that allow for inputing data. I believe the problem I have, has a simple
solution. My problem: The forms opened by clicking on the command buttons
open up as large forms of what appears to be random sizes. When I resize the
forms, the new sizes are not saved and when I use the database again the
forms to large again. How do I set the size of a form?
 
I have created a Master Form which opens when I first open a database. On
this form are several command buttons that when selected open other forms
that allow for inputing data. I believe the problem I have, has a simple
solution. My problem: The forms opened by clicking on the command buttons
open up as large forms of what appears to be random sizes. When I resize the
forms, the new sizes are not saved and when I use the database again the
forms to large again. How do I set the size of a form?

You can place code in the form's Open or Load event.
Look up the MoveSize method in VBA help.
Note: All measurements must be in Twips, 1440 per inch.

DoCmd.MoveSize .5*1440,1*1440,3*1440,2*1440

The above will open the form 1/2-inch from the left edge of the
screen, 1 inch down from the top, with a form size of 3 inches wide
and 2 inches tall.
 
Back
Top