I've tried adding a line in Design View but this only has the effect of
depositing a portion of a line beside each record. I'm looking for one long
continuous vertical line.
Any ideas?
--
Sunrise
Look up the Line Method in VBA help.
Place the code below in the report's Page event.
Note: you may have to adjust the length of the line below.
Private 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 = Int(Me.ScaleWidth / 2) ' find the middle of the page
Y1 = Me.Section(3).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 Page
' Header + Height of the Page Footer).
Y2 = Me.ScaleHeight - (Me.Section(1).Height + Me.Section(4).Height)
Me.Line (X1, Y1)-(X2, Y2) ' This draws the line
End Sub
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
fredg wrote:
>> I have a two-column report and would like to have one solid line between the
>> two columns.
>[quoted text clipped - 4 lines]
>>
>> Any ideas?
>
>Look up the Line Method in VBA help.
>
>Place the code below in the report's Page event.
>Note: you may have to adjust the length of the line below.
>
>Private 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 = Int(Me.ScaleWidth / 2) ' find the middle of the page
>Y1 = Me.Section(3).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 Page
>' Header + Height of the Page Footer).
>
>Y2 = Me.ScaleHeight - (Me.Section(1).Height + Me.Section(4).Height)
>
>Me.Line (X1, Y1)-(X2, Y2) ' This draws the line
>
>End Sub
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200907/1
June7 wrote:
>Thanks, I might have use for this.
>Side note: re the dim statement. Only Y2 is declared as String, the others
>are Variant. Must explicitely declare datatype for each variable even if on
>same line else will be Variant.
>
>>> I have a two-column report and would like to have one solid line between the
>>> two columns.
>[quoted text clipped - 27 lines]