Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Report Line Method Documentation Confusing

142 views
Skip to first unread message

Jerry Kogan

unread,
Nov 11, 2002, 4:49:56 PM11/11/02
to
I would like to use the Report Line Method to draw
vertical lines during the OnPrint event of the detail
section. The VBA documentation with Access 2002 lists the
following function arguments:
expression.line( flags, x1, y1, x2, y2, color)
It then says "flags" is a required integer, but I can't
find any additional documentation about what integer
arguments should be used in "flags".

The example given, and all of the other examples that I
have found use arguments explained in older versions of
Access:
object.line [[Step](x1,y1)]-[Step](x2,y2)[,[color][,B
[F]]]

Will this older argument format still work with Access
2002? If not, how do I find documentation for the flags
parameter.

Jerry Kogan

unread,
Nov 11, 2002, 5:35:39 PM11/11/02
to
Thanks for your response. I had already looked at your
examples and none of them matched the format specified by
the current documentation. I assume your examples will
work with Access 2002, so does that mean that the current
documentation is wrong?

>-----Original Message-----
>Have a look here for sample code:
>http://www.lebans.com/PrintLines.htm
>Specifically, see the older methods in:
>http://www.lebans.com/DownloadFiles/printlines.zip
>
>--
>
>HTH
>Stephen Lebans
>http://www.lebans.com
>Access Code, Tips and Tricks
>Please respond only to the newsgroups so everyone can
benefit.
>
>
>"Jerry Kogan" <jko...@cksoftware.com> wrote in message
>news:a04901c289cc$4664cca0$39ef2ecf@TKMSFTNGXA08...

>.
>

Stephen Lebans

unread,
Nov 11, 2002, 5:11:34 PM11/11/02
to
Have a look here for sample code:
http://www.lebans.com/PrintLines.htm
Specifically, see the older methods in:
http://www.lebans.com/DownloadFiles/printlines.zip

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"Jerry Kogan" <jko...@cksoftware.com> wrote in message
news:a04901c289cc$4664cca0$39ef2ecf@TKMSFTNGXA08...

Stephen Lebans

unread,
Nov 11, 2002, 8:09:32 PM11/11/02
to
I do not use A2K2 very much so I cannot comment directly. Why not simply
try the samples I pointed you to in A2K2 and see if they work.
OK, you're gonna make me run up to my daughters bedroom to check it out
on her XP box.
Back in a sec.....
OK first of all, the sample code I pointed you to works fine under
Access A2K2. So if nothing else you can use the methods outlines in my
code.

I see what you mean about the Access Help file on the Line method.
Doesn' t make any sense does it? I'll pass it on to our MVP lead and see
if she will passs it on and so on and so on.

Well here's the A97 version that makes sense!<grin>


The Line method draws lines and rectangles on a Report object when the
Print event occurs.

Syntax

object.Line [[Step](x1, y1)] - [Step](x2, y2)[, [color][, B[F]]]

You can use this method only in an event procedure or a macro specified
by the OnPrint or OnFormat event property for a report section, or the
OnPage event property for a report.
The Line method has the following arguments.

Argument Description
object The Report object on which the line or rectangle is to be drawn.
Step A keyword that indicates the starting point coordinates are
relative to the current graphics position given by the settings for the
CurrentX and CurrentY properties of the object argument.
x1, y1 Single values indicating the coordinates of the starting point
for the line or rectangle. The Scale properties (ScaleMode, ScaleLeft,
ScaleTop, ScaleHeight, and ScaleWidth) of the Report object specified by
the object argument determine the unit of measure used. If this argument
is omitted, the line begins at the position indicated by the CurrentX
and CurrentY properties.
Step A keyword that indicates the end-point coordinates are relative to
the line's starting point.
x2, y2 Single values indicating the coordinates of the end point for the
line to draw. These arguments are required.
color A Long value indicating the RGB (red-green-blue) color used to
draw the line. If this argument is omitted, the value of the ForeColor
property is used. You can also use the RGB function or QBColor function
to specify the color.
B An option that creates a rectangle by using the coordinates as
opposite corners of the rectangle.
F F cannot be used without B. If the B option is used, the F option
specifies that the rectangle is filled with the same color used to draw
the rectangle. If B is used without F, the rectangle is filled with the
color specified by the current settings of the FillColor and BackStyle
properties. The default value for the BackStyle property is Normal for
rectangles and lines.
Remarks

To connect two drawing lines, make sure that one line begins at the end
point of the previous line.
The width of the line drawn depends on the DrawWidth property setting.
The way a line or rectangle is drawn on the background depends on the
settings of the DrawMode and DrawStyle properties.
When you apply the Line method, the CurrentX and CurrentY properties are
set to the end point specified by the x2 and y2 arguments.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"Jerry Kogan" <jko...@cksoftware.com> wrote in message

news:44a901c289d2$a9199a00$3bef2ecf@TKMSFTNGXA10...

Marshall Barton

unread,
Nov 12, 2002, 10:58:02 AM11/12/02
to
Stephen Lebans wrote:

>I see what you mean about the Access Help file on the Line method.
>Doesn' t make any sense does it? I'll pass it on to our MVP lead and see
>if she will passs it on and so on and so on.
>
>Well here's the A97 version that makes sense!<grin>
>

>object.Line [[Step](x1, y1)] - [Step](x2, y2)[, [color][, B[F]]]

>> >"Jerry Kogan" wrote:
>> >>The VBA documentation with Access 2002:


>> >> expression.line( flags, x1, y1, x2, y2, color)
>> >> It then says "flags" is a required integer, but I can't
>> >> find any additional documentation about what integer
>> >> arguments should be used in "flags".

To make matters even more confusing, the A2002 Help topic
has example code that uses the traditional syntax instead of
the syntax at the top of the topic.

Maybe the tech writer copied, pasted and only partially
edited a man page description for a C library ? ? ?

--
Marsh
MVP [MS Access]

0 new messages