Does anyone know how to get a label box to grow in synch with a memo field?
I am trying to have the borders for the label and memo field equal but
obviously as the memo grow field grows it gets out of synch with the label
borders. Any ideas?
The Label can't grow, but you can draw a box around it, sized to the
height of the associated control.
Set the BorderStyle of the Memo control to Solid.
Set it's BorderWidth to Hairline.
Set it's CanGrow property to Yes.
Set the Detail Section CanGrow to Yes.
Set the Label's Top to the same as the Memo control's Top.
Set the Label's BorderStyle to Transparent (no border).
Place the following code in the Detail Section's 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.MemoControl.Height
X1 = MemoLabelName.Left
X2 = MemoLabelName.Left + Label337.Width
Y1 = MemoLabelName.Top
Y2 =MemoLabelName.Top + lngHeight
Me.Line (X1, Y1)-(X2, Y2), vbBlack, B
Change MemoControl to whatever the actual name of the Memo control is.
Change MemoLabelName to whatever the actual name of the label is.