Form Size and Location

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?
 
L

Linq Adams via AccessMonster.com

In Access, when one form opens Maximized (such as your Master Form) every
subsequent form, by Default, opens Maximized. In the forms that you don't
want opening Maximized, in the Form_Load event, try Me.Restore. This should
open them to whatever size you've set as their norm.
 
F

fredg

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top