Lebans' Examples

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Ok, Here is a really stupid question...I have copied Lebans' Zip file
"PrintLinesClass2K.ZIP" to my PC, extracted it, and opened up the database
contained within the Zip file. Now what?

I want one border around my report, around the header, the detail, and the
footer.

In the zip file there are two BAS files, three CLS files, and one mdb file.
I am guessing I need to copy something into my own databse but waht exactly
do I copy? And, once I do that, what control or button do I click to draw
the border where I want it?

Sorry for the stupid question...
 
Here is code from Help with a couple modifications. This will draw a thick
red line around your report page.

Private Sub Report_Page()
Dim lngColor As Long
Dim sngTop As Single, sngLeft As Single
Dim sngWidth As Single, sngHeight As Single


' Set scale to pixels.
Me.ScaleMode = 3
' Top inside edge.
sngTop = Me.ScaleTop + 5
' Left inside edge.
sngLeft = Me.ScaleLeft + 5
' Width inside edge.
sngWidth = Me.ScaleWidth - 10
' Height inside edge.
sngHeight = Me.ScaleHeight - 10
' Make color red.
lngColor = RGB(255, 0, 0)
' Draw line as a box.
Me.DrawWidth = 10
Me.Line (sngTop, sngLeft)-(sngWidth, sngHeight), lngColor, B

End Sub
 
Thank you. That is what I wanted. I was also able to change the color to
black and change the border/line thickness.

I just copied your code, opened up my report in Design View, clicked on the
Code button in the toolbar, and just pasted your code. It was pasted in the
"General" "Declarations" section of the coding window. However, as soon as
I pasted the code, the coding window changed from the "General"
"Declarations" section to the "Reports" "Page" section.

Why is that? Is that what I do with Leban's examples...just copy whatever
coding I think does what want until find the right code? Sorry for being so
dense but am brand new at all this...
 
Reports have event handlers of which the Report_Page() is one.

I haven't reviewed Stephen's code to know where or how it gets implemented.
He usually has sample usage in the file. If you can't figure it out, don't
worry. I have no clue how he does what he does most of the time :-)
 
Back
Top