Vertical Lines in Detail Section of Report

D

doodle

Greetings all.
Windows xp, access 97

I have a report that contains a sub report in the detail section. It is
an invoice that I have built from an excel template. The invoice has
the detail separated by "Columns" with dividing lines.

The problem is that I cannot get the lines to repeat down the page.
What I tried:

1. Putting the lines in the detail section of the main report.
Issue: The lines do not repeat if there is a second page.

2. Putting the lines in the detail section of the sub report.
Issue: The lines do not repeat beyond the records, so if the records do
not go to the end of the page, the lines stop where the records end.

What I really need is six lines to extend from top to bottom in the
detail section. These are the twips for .left for all six lines:

0
660
5580
7020
8520
11460


HELP!!!


-doodle
 
D

doodle

I came up with this as a solution:

Sub DrawLine()
Dim rpt As Report, lngColor As Long
Dim sngTop As Single, sngLeft As Single
Dim sngWidth As Single, sngHeight As Single

' Rectangle #1
Set rpt = Reports!rptCommercialInvoice
rpt.ScaleMode = 3
sngTop = rpt.ScaleTop + 0 ' Left
sngLeft = rpt.ScaleLeft + 2095 'Top
sngWidth = rpt.ScaleWidth - 4530 'Right
sngHeight = rpt.ScaleHeight - 900 'Bottom
rpt.Line (sngTop, sngLeft)-(sngWidth, sngHeight), lngColor, B

' Rectangle #2
Set rpt = Reports!rptCommercialInvoice
rpt.ScaleMode = 3
sngTop = rpt.ScaleTop + 2322 ' Left
sngLeft = rpt.ScaleLeft + 2095 'Top
sngWidth = rpt.ScaleWidth - 1875 'Right
sngHeight = rpt.ScaleHeight - 900 'Bottom
rpt.Line (sngTop, sngLeft)-(sngWidth, sngHeight), lngColor, B

' Rectangle #3
Set rpt = Reports!rptCommercialInvoice
rpt.ScaleMode = 3
sngTop = rpt.ScaleTop + 3543 ' Left
sngLeft = rpt.ScaleLeft + 2095 'Top
sngWidth = rpt.ScaleWidth - 30 'Right
sngHeight = rpt.ScaleHeight - 900 'Bottom
rpt.Line (sngTop, sngLeft)-(sngWidth, sngHeight), lngColor, B

End Sub

Private Sub Report_Page()
Call DrawLine
End Sub
 

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