adding lines

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a form, but the quantity of lines in the details section
varies from customer to customer, I wish to add lines separating the columns,
the lines need to continue to the end of page but they stop after the last
detail line for each customer, obviously in a form that is then sent out and
filled in by the customer this affect looks very poor
Any help gratefully received
 
You mention "form" and "columns". Do you actually mean "report" and
something? Is this a multiple column report (page layout) or do you just
mean columns of fields in a report? Is each customer on their own page are
do you have multiple customers per page?

I think you can use code in the On Page event of the report (if this is a
report) to draw lines down the entire page.
 
Hi Duane

Sorry, I am creating a report which has one customer per page, one customer
may have 5 lines of details which is split into 3 columns and others may have
more or less lines.
 
"Is this a multiple column report (page layout) or do you just mean columns
of fields in a report?"
I'm not sure if you have select File->Page Setup->Columns or are the "3
columns" just 3 text boxes in the report?

If you simply want a constant number of horizontal lines printed down the
entire page (every page), you can use code in the On Page event like:

Private Sub Report_Page()
Dim intRptHeadHeight As Integer
Dim intPageHeadHeight As Integer
Dim intTopMarg As Integer
Dim intDetailHeight As Integer
Dim intRecNum As Integer
intRptHeadHeight = Me.ReportHeader.Height
intPageHeadHeight = Me.Section(3).Height
intTopMarg = intRptHeadHeight + intPageHeadHeight
intDetailHeight = Me.Section(0).Height
For intRecNum = 1 To 20 'print 20 lines
Me.CurrentX = 200
Me.CurrentY = intTopMarg + _
((intRecNum - 1) * intDetailHeight)
'Me.Print intRecNum 'print the line number
Me.Line (0, intTopMarg + _
(intRecNum * intDetailHeight)) _
-Step(Me.Width, 0)
Next
'draw a big red box around the report
'Me.ForeColor = vbRed
'Me.DrawWidth = 20
'Me.Line (0, 0)-(Me.ScaleWidth, Me.ScaleHeight), , B

End Sub
 
Back
Top