I'm trying to size a subform control to display all of the records (thus
eliminating the vertical scroll bar). I know that the CanGrow property is
only for printing.
My thought was to determine the number of records in the subform and the
current setting of RowHeight and use that to determine how to size the
subform control.
My problem seems to involve the RowHeight property. When I try to determine
it's current value the property returns a value of True (-1) instead of the
twips. What am I doing wrong?
Dim Mreccount As Double
Dim Msubfrmheight As Double
Dim Mrowheight As Double
Mreccount = Me.Child5.Form.RecordsetClone.RecordCount
Mrowheight = Me.Child5.Form.RowHeight ''' <--this returns true, why?
Msubfrmheight = (Mreccount + 2) * Mrowheight
Me.Child5.Height = Msubfrmheight
Thanks To All,
Fred Zuckerman