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

Use of Line to Draw Border and Gutter on Report

Status
Not open for further replies.
May 7, 1999
130
US
Hi!

I was successful drawing a border around the page of an Access 2000 report, thanks to an article for printing a telephone directory from Access 97 that I found in PCTech from PC Magazine (4/21/98); however the gutter-line that I wanted did not appear. Moreover, I tried looking up the parameters that are to be sent to the line "verb" in VBA, but couldn't figure out how to make the line bolder or even to find out what my options are.

So, please tell me:
(1) How to find out what "me.line" in the below code can have as options (e.g., setting boldness) & where I look up the information in the on-line help and
(2) How to get the gutter-line to appear.

private sub report_page()
dim 21, y1, x2, y2 as integer

' draw a border around the page
Me.Line (0,0)-(me.ScaleWidth,me.ScaleHeight), , B

'set the coordinates and draw a line down the middle of the page
x1 = int(me.ScaleWidth / 2) ' middle of the page
y1 = me.section(acPageHeader).Height ' start just below pageheader
x2 = x1 + 1 + me.DrawWidth
y2 = me.ScaleHeight
Me.Line (x1, y1) - (x2, y2), , B ' draw the line

End Sub

Thanks,

John John Harkins
 
Huh?

Hard to tell you what is "Wrong" when it works. Except for the typo in the declaration (21 should be X1) it 'works". Of course it isn' "prefect", as the gutter line doesn't go all the way to the top (e.g. meet the horizontal line of the "Box", but it is certainly visible.

The only way I know (in this context) to make the Gutter line any different is (as you have done) to manipulate the X coordinates. If you make X2 "significantly" different than X1, you will get another "Box", where you can set the arg to Fill it. The current setup will (of course) have the "box" start at the center of the page and "bleed" to the right. To center it, you need to offset X1 by subtracting 1/2 of the difference between the X2 and X1 from the (current)) X1.

The other thought would be to use the Line control. Place it (or multiples of it - one per section) on the report at design time, but manipulate it at runtime. The OCNTROL object will have observable properties, while the line METHOD simply places the RESULTS of the method on the report output.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Gotta tell you... this works! DrawWidth is just what I was looking for.

Even figured out that my installation of VBA help was at the root of not being able to find out about the line method.

Thanks! John Harkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top