Kevin,
The total Height of a Form is the sum of the Height of all of the
Sections (Form Header/Footer) and the Detail(s) so there is no one place
for it. If the Height of your headers and footers are contant and you
are not using a continous form then you can add the Detail section to
your header/footer heights. Also, keep in mind that the Height (and
Width) are actualy stored as Twips (1440 twips = 1 inch).
From the Help:
· The Height property applies only to form sections and report sections,
not to forms and reports.
· The Width property applies only to forms and reports, not to form
sections and report sections.
· Both properties apply to controls on forms and reports.
The height of sections and the width of forms and reports are measured
from the inside of their borders.
Air Code
========
For I=0 to 4 '(the five sections of a Form, Report has nine)
lTotalTwips = lTotalTwips + Me.Section(I).Height
Next
Msgbox "The total Height of the Form is: " & _
lTotalTwips /1440 & " Inches"
=========
The Section Properties are read only.
If the object you want to resize is in the Detail Section and you want
it to be a ratio of the Detail Height then:
Air Code
========
'Assume object is to be 50% of the height of the Form Detail Section
Me.MyObject.Height = Me.Section(0).Height / 2
=========
Hope that helps
Bri
Kevin Myers wrote:
How can one obtain obtain the height of a MS Access 2K form?
There is a width property, but I don't see a corresponding height property.
I need to obtain the height of the form so that I can dynamically resize an
object on the form in the form's Form_Resize method when a user resizes the
form, both horizontally and vertically.
Thanks,
s/KAM