Hi,
I need to do the same thing, more or less, but need more detail on the
code. My detail section will have data in it, I want to print horizontal
lines to finish out the page.
Thanks for your help
Marshall Barton wrote:
Re: Drawing horizontal lines in Detail Area (Access 2003 xp sp3)
05-Aug-08
Allan Belcher wrote:
So all you need to know is where the jpb header ends. Then
the page event can start drawing the lines below that.
Use code along these lines:
Private Const SPACING As Long = 555 'twips
Dim JobBottom As Long
Sub JobHeader_Print(..,
JobBottom = Me.Top + Me.Height
End Sub
Sub Report_Page()
Dim pos As Long
For pos = JobBottom + SPACING To <paper height minus
bottom margin minus Me.Section(4).Height> Step SPACING
Me.Line (0,pos)-Step(Me.Width,0)
Next pos
End Sub
--
Marsh
MVP [MS Access]
Previous Posts In This Thread:
Drawing horizontal lines in Detail Area (Access 2003 xp sp3)
I have a report that we will use as a job card with a fixed header and
footer size and a sub header of variable size. (Can grow to fit multiple
items on the to-do list) What I want to do is generate horizontal lines
for writing on 1cm apart in the detail section. How can the size of the
detail section be calculated.
I have in mind to create Do / Until loop that generates the lines at 1cm
spaces until it runs out of space. I just don't know how to determine
the size of the detail space per page.
Thought - A standard page will be a set height. Can I call the height of
each header and footer, subtract it from the total height and then set
the detail height to the result and then use that result as the max
height in my Do/Until loop?
Re: Drawing horizontal lines in Detail Area (Access 2003 xp sp3)
Allan Belcher wrote:
How tall is the detail section?
Can the detail section grow?
Will there be more than one detail record in the report or
on a page?
FYI:
You can use the detail section's Print event to set a module
level variable to Me.TOP + Me.Height
Thenm when the Page event is run, you can use the variable
as the bottom of the last detail on the page. The bottom of
the page is the paper height less the bottom margin and the
page footer height.
--
Marsh
MVP [MS Access]
Re: Drawing horizontal lines in Detail Area (Access 2003 xp sp3)
Marshall Barton wrote:
Marshal,
The detail area actually has nothing in it.
Page header - nothing
Job header - all relevant job information. Set to Can Grow
Detail - nothing. Lines to go in here. Set to Can grow & Can Shrink
Page Footer - generic wording
This report will print as a single page which is then photocopied onto
card. This becomes the job card that goes with the material around the
workshop. The various operations required are hand written onto the
lined detail section.
We were using a form with a graphic of the layout as the background but
found that we were limited to the number of lines that would fit into
the listing area, so I am trying to turn it into a report. The item
space now grows as needed, I just need to be able to print lines for
hand writing on.
Hope this makes sense.
Regards,
Allan
Re: Drawing horizontal lines in Detail Area (Access 2003 xp sp3)
Allan Belcher wrote:
So all you need to know is where the jpb header ends. Then
the page event can start drawing the lines below that.
Use code along these lines:
Private Const SPACING As Long = 555 'twips
Dim JobBottom As Long
Sub JobHeader_Print(..,
JobBottom = Me.Top + Me.Height
End Sub
Sub Report_Page()
Dim pos As Long
For pos = JobBottom + SPACING To <paper height minus
bottom margin minus Me.Section(4).Height> Step SPACING
Me.Line (0,pos)-Step(Me.Width,0)
Next pos
End Sub
--
Marsh
MVP [MS Access]
Re: Drawing horizontal lines in Detail Area (Access 2003 xp sp3)
Marshall Barton wrote:
Marshall,
Thanks for the help. I was able to use your code and adapt it to get
just what I wanted.
Regards,
Allan
Submitted via EggHeadCafe - Software Developer Portal of Choice
How to display a Gravatar Image with 100 Percent Client Script Code
http://www.eggheadcafe.com/tutorial...c-b0877c10ecb4/how-to-display-a-gravatar.aspx