Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting a report to a page...

Status
Not open for further replies.
Mar 15, 2002
82
US
I haven't set up a report in this fashion before. All reports I have done were straightforward, so I'm a bit lost on this right now.

My company orders bulk food products, i.e. fruit, vegetables, and they produce them into packaged products. Well, I have the database set up to record all pertinent information regarding vendor, product, pricing, etc. We pay based on the product we were able to use.

Anyway, enough about that. My report uses the report header, page header, detail, and page footer sections. I want lines drawn through the whole detail section, regardless of how many records are there. For example, if 20 detail lines can fit on a page and only 5 print, I still want the lines separating each column to fill the detail section all the way down to the page footer.

I just don't know how to go about doing it. Anyone have any ideas?

Thanks!

---------------------------------------
Bob Beck
IS Administrator

In my limited experience, 80-90% of all problems brought to my attention can be attributed to PEBCAK...the other 10-20% can be attributed to MS!
 
You could use the Line method in the On Page event. Below is some sample code that prints 18 horizontal lines. You can modify the code to print vertical lines.

Private Sub Report_Page()
Dim intLineCount As Integer
Dim intLines As Integer
Dim intLineSpacing As Integer
Dim intTopMargin As Integer
Dim intYPos As Integer

intLines = 18
intTopMargin = 720 'half inch
intLineSpacing = Me.Detail.Height
For intLineCount = 1 To intLines
intYPos = (intLineCount * intLineSpacing) + _
intTopMargin
Me.Line (0, intYPos)- _
Step(Me.Width, 0)
Next
End Sub

Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top