Code: Select all
Option Compare Database
Option Explicit
Function DrawLines(R As Report, ParamArray xPos())
' Number of twips in one inch.
Const OneInch = 1440
' Maximum height of a section in inches.
Const MaxHeight = 22
' Loop index
Dim i As Integer
' Draw vertical line at xPos(i) inches from left margin. Covers entire section.
For i = LBound(xPos) To UBound(xPos)
R.Line (xPos(i) * OneInch, 0)-(xPos(i) * OneInch, MaxHeight * OneInch)
Next i
End Function
Code: Select all
Option Compare Database
Option Explicit
Function DrawLines(R As Report, ParamArray xPos())
' Number of twips in one inch.
Const OneInch = 1440
' Maximum height of a section in inches.
Const MaxHeight = 22
' Loop index
Dim i As Integer
' Draw vertical line at xPos(i) inches from left margin. Covers entire section.
For i = LBound(xPos) To UBound(xPos)
R.Line (xPos(i) * OneInch, 0)-(xPos(i) * OneInch, MaxHeight * OneInch)
Next i
End Function
Function fDrawLines4LagReports(strReportName As String)
' Draw vertical lines at X" from left margin.
Call DrawLines(strReportName, 2.7917, 3.4063, 4.0104, 4.5833, 5.162, 5.7917, 6.375, 6.9896, 7.6056, 8.195, 8.3229, 9.0625, 9.8292) '8.3542
End Function
Code: Select all
Dim strDocName As String
strDocName = "7rptPerformanceRptDept"
Call fDrawLines4LagReports(strDocName)
Obviously I don't fully understand how this module works, so any ideas are GREATLY appreciated.
Ken