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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Lines

Status
Not open for further replies.

EllieFant

MIS
May 15, 2001
513
US
My boss wants to make a report look more like a form by putting a border around the report. I found the following code:

Me.Line (0, 0)-(Me.ScaleWidth, Me.ScaleHeight), , B

which does what he wants EXCEPT (always that except):

* The box goes around the page footer (which has the print date and other various informaiton) - He wants the line above the page footer
* The line is hairline and he was wanting something a bit thicker (which doesn't make since cause he hates bold things...says it looks written/drawn with a fat crayon - but hey, he is the boss).

The ideal fix would be a thicker than hairline box around the page header..a small gap where there is no line....a thicker than hairline box around the detail section of the report, and no box (or even a thicker than hairline white box) around the page footer.

I seen that there is a DrawWidth property but have no idea where to use it at - didn't find much help on it in the Access Help section.

I tried using the above code in the on print event of the report header (worked fine except that it is a thin line) and the detail section (didn't work so good - Didn't go around the whole section).

Any ideas on how to give my boss what he is looking for?

Thanks once again for being here to help people such as myself.


Ellie
**Using Access 97 at work**
**Using Access 2000 at home**

elliefant@qwest.net
 
I got the lines to be thicker.

Now if my detail section goes to a second page, the line doesn't go to the bottom of the section.

Here is the code I am using:

Me.DrawWidth = 30

Me.Line (0, 0)-(0, Me.Height), 0
Me.Line (0, Me.Height)-(Me.Width, Me.Height), 0
Me.Line (0, 0)-(Me.Width, 0), 0
Me.Line (Me.Width, 0)-(Me.Width, Me.Height), 0


Any ideas why I am having line troubles on page 2? It appears to only go about half way down the page.

Thanks!!

Ellie
**Using Access 97 at work**
**Using Access 2000 at home**

elliefant@qwest.net
 
Getting closer. I now have the lines going all the way down to the end of the section.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim X1 As Single, Y1 As Single
Dim X2 As Single, Y2 As Single
Dim X3 As Single, Y3 As Single
Dim X4 As Single, Y4 As Single
Dim Color As Long

' Specify unit of measurement for coordinates on a page...
Me.ScaleMode = 5 ' Specify that measurement occur in inches.

' Set line to print 5 inches from the left margin.
'X1 = 5
X1 = 0
X2 = 0
X3 = 6.5
X4 = 6.5

' Set line to print from the top of the detail section
' to a maximum height of 22 inches.
Y1 = 0
Y2 = 22
Y3 = 0
Y4 = 22

Me.DrawWidth = 30 ' Width of the line (in pixels).
Color = RGB(0, 0, 0) ' Use black line color.

' Draw the line with the Line method.
Me.Line (X1, Y1)-(X2, Y2), Color
Me.Line (X3, Y3)-(X4, Y4), Color
End Sub


HOWEVER, if the detail section goes over to a second page, there is no bottom line on the first page. Right now the bottom line is drawn in so it appears at the bottom of the section (whatever page the section ends on).

How do I get it on the bottom of the page if the detail section flows over.

Thanks

Ellie
**Using Access 97 at work**
**Using Access 2000 at home**

elliefant@qwest.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top