If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Blank lines uneven distribution
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 -- Access 2003/2007 User, Thanks in advance Bobbye |
#2
|
|||
|
|||
Blank lines uneven distribution
Is the section allowed to grow? If so, change it to No.
Duane Hookom MS Access MVP "Bobbye R" wrote in message ... 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 -- Access 2003/2007 User, Thanks in advance Bobbye |
Thread Tools | |
Display Modes | |
|
|