My boss wants to make a report look more like a form by putting a border around sections in the report. I have done so using the following code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim X1 As Single, Y1 As Single
Dim X2 As Single, Y2 As Single
Dim X3 As Single, Y3 As Single
Dim X4 As Single, Y4 As Single
Dim Color As Long
' Specify unit of measurement for coordinates on a page...
Me.ScaleMode = 5 ' Specify that measurement occur in inches.
' Set line to print 5 inches from the left margin.
'X1 = 5
X1 = 0
X2 = 0
X3 = 6.5
X4 = 6.5
' Set line to print from the top of the detail section
' to a maximum height of 22 inches.
Y1 = 0
Y2 = 22
Y3 = 0
Y4 = 22
Me.DrawWidth = 30 ' Width of the line (in pixels).
Color = RGB(0, 0, 0) ' Use black line color.
' Draw the line with the Line method.
Me.Line (X1, Y1)-(X2, Y2), Color
Me.Line (X3, Y3)-(X4, Y4), Color
End Sub
HOWEVER, if the detail section goes over to a second page, there is no bottom line on the first page. Right now the bottom line is drawn in so it appears at the bottom of the section (whatever page the section ends on).
How do I get it on the bottom of the page if the detail section flows over.
Thanks!
Lena
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim X1 As Single, Y1 As Single
Dim X2 As Single, Y2 As Single
Dim X3 As Single, Y3 As Single
Dim X4 As Single, Y4 As Single
Dim Color As Long
' Specify unit of measurement for coordinates on a page...
Me.ScaleMode = 5 ' Specify that measurement occur in inches.
' Set line to print 5 inches from the left margin.
'X1 = 5
X1 = 0
X2 = 0
X3 = 6.5
X4 = 6.5
' Set line to print from the top of the detail section
' to a maximum height of 22 inches.
Y1 = 0
Y2 = 22
Y3 = 0
Y4 = 22
Me.DrawWidth = 30 ' Width of the line (in pixels).
Color = RGB(0, 0, 0) ' Use black line color.
' Draw the line with the Line method.
Me.Line (X1, Y1)-(X2, Y2), Color
Me.Line (X3, Y3)-(X4, Y4), Color
End Sub
HOWEVER, if the detail section goes over to a second page, there is no bottom line on the first page. Right now the bottom line is drawn in so it appears at the bottom of the section (whatever page the section ends on).
How do I get it on the bottom of the page if the detail section flows over.
Thanks!
Lena