Can grow & horizontal line problem

V

Vensia

Dear all,

I have a report and there are five text box (solid border style property) at
the detail section.
One of the text box has property can grow = yes. The problem is how to make
the horizontal line is align when the can grow text box contains more than
one line.
Thanks.

Regards,
Vensia
 
G

Guest

1) Set the Border Style of the text boxes to transparent.
2) Use the OnPrint event procedure to draw lines around the text boxes.

You would then write code that looks like this:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me.Line (textbox1.Left, textbox1.Top) _
-Step(textbox1.Width, textboxThatCanGrow.Height), , B
Me.Line (textbox2.Left, textbox2.Top) _
-Step(textbox2.Width, textboxThatCanGrow.Height), , B
Me.Line (textbox3.Left, textbox3.Top) _
-Step(textbox3.Width, textboxThatCanGrow.Height), , B
Me.Line (textboxThatCanGrow.Left, textboxThatCanGrow.Top) _
-Step(textboxThatCanGrow.Width, textboxThatCanGrow.Height), , B
End Sub

If you have more than one text box on a row that can grow, you will have to
add code to check which textbox is the tallest and replace
‘textboxThatCanGrow.Height’ with the TheTallestTextbox.Height.

e.g.
Dim Tallest
If textboxThatCanGrow1.Height > textboxThatCanGrow2.Height Then
Tallest = textboxThatCanGrow1.Height
ElseIf ……..

End If


Joanthan
 
V

Vensia

Thanks Joan for you help.

Joanthan said:
1) Set the Border Style of the text boxes to transparent.
2) Use the OnPrint event procedure to draw lines around the text boxes.

You would then write code that looks like this:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me.Line (textbox1.Left, textbox1.Top) _
-Step(textbox1.Width, textboxThatCanGrow.Height), , B
Me.Line (textbox2.Left, textbox2.Top) _
-Step(textbox2.Width, textboxThatCanGrow.Height), , B
Me.Line (textbox3.Left, textbox3.Top) _
-Step(textbox3.Width, textboxThatCanGrow.Height), , B
Me.Line (textboxThatCanGrow.Left, textboxThatCanGrow.Top) _
-Step(textboxThatCanGrow.Width, textboxThatCanGrow.Height), , B
End Sub

If you have more than one text box on a row that can grow, you will have to
add code to check which textbox is the tallest and replace
'textboxThatCanGrow.Height' with the TheTallestTextbox.Height.

e.g.
Dim Tallest
If textboxThatCanGrow1.Height > textboxThatCanGrow2.Height Then
Tallest = textboxThatCanGrow1.Height
ElseIf ....

End If


Joanthan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top