On Fri, 5 Sep 2008 13:27:35 -0700 (PDT), evenlater wrote:
I've got a report with memo fields set to "CanGrow". Next to this text
box is a combo box. I want the combo box to be as tall as the text box
after it grows. I've tried the following in my code:
ComboBox.Height = TextBox.Height
... but it's still giving me the height of the text box prior to
growth. Anybody have any solutions?
You can use the Line method to draw a box around the control.
1) Better to use a Text control in the report, not a combo box.
You can't use the drop-down in the report anyway, and the box will not
fill in properly using a Combo box.
2) Set the Text (or if you insist, the Combo) control's Border Style
to Transparent.
3) Set the Memo control's Border Style to Solid.
4) Code the Detail Print event:
Dim lngHeight As Long
Dim X1 As Single
Dim Y1 As Single
Dim Y2 As Single
Dim X2 As Single
Me.DrawStyle = 0
lngHeight = Me.Memo.Height
X1 = [TextControl].Left
X2 = [TextControl].Left + [TextControl].Width
Y1 = [TextControl].Top
Y2 = [TextControl] + lngHeight
Me.Line (X1, Y1)-(X2, Y2), 0, B
Change [TextControl] to the actual name of your Text or Combo Box
Control's name.
Change Memo to the actual name of your memo control.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail