C
Coderz
The code below perfectly work if it is not located inside a subreport.
Public Sub Report_Page()
Dim X1, Y1, X2, Y2 As Single
Me.DrawStyle = 0 ' a solid line
Me.DrawWidth = 1 ' set the thickness of the line
' Set the coordinates and draw a line down the middle of the page.
X1 = 60 'Int(Me.ScaleWidth / 2) ' find the middle of the page
Y1 = Me.Section(1).Height ' start just below the page header
X2 = X1 ' the line is vertical
' length of line is the length of the Page - (Height of the
PageHeader + Height of the Page Footer).
Y2 = Me.ScaleHeight
Me.Line (X1, Y1)-(X2, Y2) ' This draws the line
Me.Line (955, Y1)-(955, Y2) ' This draws the line
Me.Line (1740, Y1)-(1740, Y2) ' This draws the line
Me.Line (3360, Y1)-(3360, Y2) ' This draws the line
Me.Line (4560, Y1)-(4560, Y2) ' This draws the line
Me.Line (5940, Y1)-(5940, Y2) ' This draws the line
Me.Line (7850, Y1)-(7850, Y2) ' This draws the line
Me.Line (9050, Y1)-(9050, Y2) ' This draws the line
Me.Line (10020, Y1)-(10020, Y2) ' This draws the line
Me.Line (11460, Y1)-(11460, Y2) ' This draws the line
End Sub
This is code is not executed if under a subreport.
How could I execute it? I tried to call it like Call
Me.[Service_Record_Details].Report.Report_Page but it gives an error.
Public Sub Report_Page()
Dim X1, Y1, X2, Y2 As Single
Me.DrawStyle = 0 ' a solid line
Me.DrawWidth = 1 ' set the thickness of the line
' Set the coordinates and draw a line down the middle of the page.
X1 = 60 'Int(Me.ScaleWidth / 2) ' find the middle of the page
Y1 = Me.Section(1).Height ' start just below the page header
X2 = X1 ' the line is vertical
' length of line is the length of the Page - (Height of the
PageHeader + Height of the Page Footer).
Y2 = Me.ScaleHeight
Me.Line (X1, Y1)-(X2, Y2) ' This draws the line
Me.Line (955, Y1)-(955, Y2) ' This draws the line
Me.Line (1740, Y1)-(1740, Y2) ' This draws the line
Me.Line (3360, Y1)-(3360, Y2) ' This draws the line
Me.Line (4560, Y1)-(4560, Y2) ' This draws the line
Me.Line (5940, Y1)-(5940, Y2) ' This draws the line
Me.Line (7850, Y1)-(7850, Y2) ' This draws the line
Me.Line (9050, Y1)-(9050, Y2) ' This draws the line
Me.Line (10020, Y1)-(10020, Y2) ' This draws the line
Me.Line (11460, Y1)-(11460, Y2) ' This draws the line
End Sub
This is code is not executed if under a subreport.
How could I execute it? I tried to call it like Call
Me.[Service_Record_Details].Report.Report_Page but it gives an error.