Blank lines uneven distribution

  • Thread starter Thread starter Bobbye R
  • Start date Start date
B

Bobbye R

I used Duane Hookom's OnPage event to add extra lines at the end of my
report. Even though I'm still an ameteur at this and don't understand how it
works it does what I need it to do.
Each page requires a Page header and footer and 21 lines of detail with a
boarder for each textbox and blank lines on the last page even if there is no
detail. The program does the job but for each line when there is data, the
text gets lower and lower in the box. Is there a way to ensure that the text
appears in the same place within the borders on each line printed?

Private Sub Report_Page()
Dim intRows As Integer
Dim intLoop As Integer
Dim intTopMargin As Integer
Dim intDetailHeight As Integer
Dim ctl As Control
intRows = 21
intDetailHeight = Me.Section(0).Height
intTopMargin = 360 '****I keep adjusting this number but it's still off
For intLoop = 1 To intRows
For Each ctl in Me.Section(0).Controls
If ctl.Tag = "Box" Then
Me.Line (ctl.Left, intLoop * intDetailHeight +
intTopMargin)-Step(Ctl.Width, intDetailHeight), , B
End If
Next
Next
End Sub
 
Back
Top