growing, shrinking text boxes

basilyos

Registered User.
Local time
Today, 12:21
Joined
Jan 13, 2014
Messages
256
hello

i have a continuous form with 4 text boxes
txt1,txt2,txt3,txt4

if txt1 has more than one line how to let it grow and in the same time the other txt boxes will grow to the same size

all the textboxes should have the biggest size

i did this but in report

i put this code in the event OnPrint

Code:
On Error Resume Next
Dim lngCounter As Long, dblMaxHeight As Double, i As Integer
dblMaxHeight = 0
ReDim strcontrol(10)
For i = 0 To 10
strcontrol(i) = "txt" & CStr(i + 1)
Next i
For lngCounter = 0 To UBound(strcontrol)
If Me(strcontrol(lngCounter)).Height > dblMaxHeight Then dblMaxHeight = Me(strcontrol(lngCounter)).Height
Next
For lngCounter = 0 To UBound(strcontrol)
If lngCounter = 0 Then
Me.Line (Me(strcontrol(lngCounter)).Left, Me(strcontrol(lngCounter)).Top)-Step(Me(strcontrol(lngCounter)).Width, dblMaxHeight), , B
Else
Me.Line (Me(strcontrol(lngCounter)).Left, Me(strcontrol(lngCounter)).Top)-Step(Me(strcontrol(lngCounter)).Width, dblMaxHeight), , B
End If
Next


is there anyway to let this done in forms
 

Users who are viewing this thread

Back
Top Bottom