Blank lines uneven distribution

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
 
D

Duane Hookom

Is the section allowed to grow? If so, change it to No.

Duane Hookom
MS Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top