A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Blank lines uneven distribution



 
 
Thread Tools Display Modes
  #1  
Old January 30th, 2010, 06:28 PM posted to microsoft.public.access.reports
Bobbye R
external usenet poster
 
Posts: 20
Default 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  
Old January 30th, 2010, 11:29 PM posted to microsoft.public.access.reports
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.