Full Version: Make all forms the same size
UtterAccess Forums > MicrosoftŪ Access > Access Forms
Im wondering is there a quick way of making all forms the same size when you open them?
Oknow in properties you can type the Width whatever size you want, but what about the Length?
Hi Damien
Difficult to predict the exact number of controls needed on each Form so inevitably they will be different sizes
nless of course you know that each Form will ONLY have 20 controls
Have you tried the MoveSize Method? That includes four parameters, including width and height.
Hope this helps,
Hi Mike
Ive 9 forms and the most controls on each form would be about 10
I have the forms set to be in the middle bust some are moving slightly when i click to open the next form, i just taught tere would be some handy way of making them all the same size
How about this (***UNTESTED***):
. Create a table called tlkpFormSize with two fields (both defined as single and will store your size in inches):
a. FrmHeight
b. FrmWidth
2. Put this function in a standard module:
Function ResizeForms(frm As Form)
Dim sglH As Single
Dim sglW As Single
sglH = Nz(DLookup("[FrmHeight]", "tlkpFormSize"),100)
sglW = Nz(DLookup("[FrmWidth]", "tlkpFormSize"),100)
frm.InsideHeight = sglH * 1440 ' to convert to TWIPS - 1440 to an inch
frm.InsideWidth = sglW * 1440
End Function

And then put the function call in the form's On Open event:
Private Sub Form_Open()
   Call ResizeForms(Me)
End Sub

Then you can make changes to the size by using the table.
Hi boblarson
Thanks for this, when i tried it, the main menu seems to jump to a different position than the rest of the screens and the same for the last screen
ive tried centering them also but this does'nt solve the problem
You can also set the LEFT and TOP of the form (just add two more fields to the table) and that way they will go to the right place.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.