Format text box height during 'OnFormat' Event (1 Viewer)

O

odavies

Guest
I have a tabular report which displays spare parts information in rows. I want to have borders on the text boxes set to 'Solid' so when the report prints it appears like a spreadsheet. At the moment on of the fields is a Memo data type, when the text in this field wraps around it increases the height of the text box. I want all the other text boxes to grow to match the height of the memo field. All advice welcome.
 

llkhoutx

Registered User.
Local time
Today, 11:50
Joined
Feb 26, 2001
Messages
4,018
Lines can't grow or shrink.

Try using borders, they'll grow and shrink.
 
R

Rich

Guest
This code is probably what your looking for
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
 

Users who are viewing this thread

Top Bottom