Draw continous vertical line in report detail section

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My report has a report header approx 1.5" tall, a page header approx 0.5"
tall, followed by the detail section.

How can I print a fixed height detail section with verticle lines even if
there are only a few records? Essentially, trying to replicate a paper form.
The line starts at the bottom of the page header and continues to the top of
page footer.

In a post a couple days ago, Allen Browne recommended the below for drawing
a line down the entire page.....this close, and I am trying to figure out a
similar approach for the detail section.

Private Sub Report_Page()
Me.Line (Me.ScaleTop, Me.ScaleLeft)-(Me.ScaleTop, Me.ScaleHeight), vbRed
End Sub

Thanks,

David
 
Just play with his code and hard-coded numbers like:
Private Sub Report_Page()
Me.Line (1400, 2000)-step(0, 10000)
End Sub
 
Thanks Duane. This gets me the results I want...but how can I avoid hard
coding numbers.

I can get the left coordinate by refering to the left property of labels in
the page header.
(i.e. sngLeft = Me.lblLev2.Left)

How can I get the top and bottom coordinates based on the top of the detail
(or bottom of the page header) and top of the page footer?


THanks again.

David
 
DML said:
Thanks Duane. This gets me the results I want...but how can I avoid
hard coding numbers.

I can get the left coordinate by refering to the left property of
labels in the page header.
(i.e. sngLeft = Me.lblLev2.Left)

How can I get the top and bottom coordinates based on the top of the
detail (or bottom of the page header) and top of the page footer?

Since PageHeaders and Footers do not grow or shrink then there should be an
exact set of coordinates that will give you what you want. There should be no
reason for them to be dynamically calculated.
 
If you need to replace hard-coded values, try:
sngLeft = Me.lblLev2.Left
Then us sngLeft in your Line method.
 
Back
Top