Greetings,
I've been wracking my brains out on this and finally decided to post. It looks like I can use a control's textheight property to determine the textbox that has the largest height in my detail section. Then I can adjust all of the control heights to that same number. I'm using the following code:
I have stepped through the code and my control's textheight value always remains 269. I have checked the control's textwidth, and that changes as it should. Any ideas why my textheight doesn't return the proper value. I've tried with the textbox's "Can Grow" property to both True and False. Below is some of the debugging I stepped through. As you can see, the textwidth changes, but the text height does not change.Code:Dim intMaxHeight As Integer Dim ctl As Control For Each ctl In Me.Section(0).Controls If ctl.ControlType = acTextBox Then If Me.TextHeight(ctl.Value) > intMaxHeight Then intMaxHeight = Me.TextHeight(ctl.Value) End If MsgBox (vbNewLine & ctl.Value & vbNewLine & Me.TextHeight(ctl.Value)) End If Next
?ctl
CARPINTERIA hjuhj oiopi[piop oi[po[po[po[p [po][o]op][ iuiyuyuf opi[pp[o[po[p tt76t78 8y7896896 oioi
Carpinteria Valley Water District
CARPINTERIA hjuhj oiopi[piop oi[po[po[po[p [po][o]op][ iuiyuyuf opi[pp[o[po[p tt76t78 8y7896896 oioi
Carpinteria Valley Water District
CARPINTERIA
Carpinteria Valley Water District
?ctl.Name
TextBoxMEName
?ctl.width
2100
2880
2880
?ctl.height
1860
1860
1860
?textheight(ctl)
269
269
269
269
?textwidth(ctl)
9216
9216
2863
1195
2863
Thanks for any help you can provide!
Jonathan Mulder