Under the title "Line Method," Microsoft Visual Basic help gives the following code example of On Format Event, for Reports.
The example works, but produces a double line between records. How do you change the report to show a single line between records on the report?
Thanks
Robert
The example works, but produces a double line between records. How do you change the report to show a single line between records on the report?
Thanks
Robert
Code:
Sub DrawLine()
Dim rpt As Report, lngColor As Long
Dim sngTop As Single, sngLeft As Single
Dim sngWidth As Single, sngHeight As Single
Set rpt = Reports![rptOption_Lines]
' Set scale to pixels.
rpt.ScaleMode = 3
' Top inside edge.
sngTop = rpt.ScaleTop + 5
' Left inside edge.
sngLeft = rpt.ScaleLeft + 5
' Width inside edge.
sngWidth = rpt.ScaleWidth - 10
' Height inside edge.
sngHeight = rpt.ScaleHeight - 10
' Make color red.
lngColor = RGB(255, 0, 0)
' Draw line as a box.
rpt.Line (sngTop, sngLeft)-(sngWidth, sngHeight), lngColor, B
End Sub