Line Numbers Down Left Side of Page

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

I'm creating a report for our City Council, and the
required format is to have line numbers counting down the
left side of each page, so they can reference specific
line numbers for discussion during the meeting. Each page
starts at 1 at the top and counts down "N" lines to the
bottom. Any ideas how to do this?
-Joe
 
More clarification. Many of the fields I am printing are
Memo style fields, meaning one control can have one to
many lines of text, each line needing it's own number.
 
Joe said:
More clarification. Many of the fields I am printing are
Memo style fields, meaning one control can have one to
many lines of text, each line needing it's own number.


I believe that the only way you can get a counter running
down the page regardless of how many line each detail
requires is to use the Print method in the report's Page
event. The Page event is unaware of any group
headers/footers so those lines would also have the line
counter displayed. Check Help for the Multitude of options
that can be used with the Print method, but a simple example
is:

Private Sub Report_Page()
Dim k As Integer

Me.CurrentY = 770 ' twips (1440th of an inch)
Me.FontName = "Arial"
Me.FontSize = 10
For k = 1 To 34
Me.CurrentX = 100
Me.CurrentY = Me.CurrentY + 140
Me.Print k
Next k
End Sub

You'll probably have some trouble getting the detail section
spacing to line up with the spacing in the CanGrow text box,
so expect to do a fair amount of tweeking the report's
layout and the CurrentX/Y numbers above.

If you do have group headers/footers, you could skip
counting those lines by and placing somewhat different code
in the detail section's Print event.
 
Back
Top