Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamically changing the height of a line 1

Status
Not open for further replies.

striker73

MIS
Jun 7, 2001
376
US
I have a report that displays a list of items that correspond to a list of customers. I want to enclose all the information about each customer in a box. I am able to do this by drawing lines around the information. I have a text box inside the information that is allowed to grow in height to be able to handle more than one line of infomration. My box technique works fine except when there are more than one line in the textbox. I have tried using the following code to make the lines on either side of the box expand with the text box, but nothing seems to work. It looks like the Detail_Format() function runs before the data has been displayed. Any ideas on how to fix this? Thanks!


Private Sub Detail_Format()
rightline.height = Me.Detail.height
leftline.height = txtMyTextBox.height
End Sub
 
Checkout thread703-171772.
It may not be exactly what you need, but it is a good start.
 
Remove all the lines/borders around your text boxes and add this code
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim CtlDetail As Control
Dim intLineMargin As Integer


intLineMargin = 60


For Each CtlDetail In Me.Section(acDetail).Controls
With CtlDetail

Me.Line ((.left + .Width + intLineMargin), 0)-(.left + .Width + _
intLineMargin, Me.Height)

End With
Next
With Me
Me.Line (0, 0)-Step(.Width, .Height), 0, B
End With

Set CtlDetail = Nothing

End Sub
HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top