Sirocco said:
I'm sorry, but I don't recognize what you're giving me as what I'm using.
I'm not familiar with the "Line" method, and what is "Step"? Please give
me the full equation. (I did this a few years ago but forgot how I did it).
This is what I have:
Me.Linename.Height = Me.Linename(69000, 0) - Step(0, 10000)
where 69000 is the x distance in twips. When I run this, "Step" is
highlighted in yellow. Maybe I don't have the right reference library
loaded. Also, where does the height of the detail section come into play?
You have several misperceptions here. First the method is
LINE, not Linename. Second, there is no Height property to
mess with. Finally, you should not be using an assignment
statement, the entire **Statement** is:
Me.Line (69000, 0) - Step(0, 10000)
which draws the line directly on the page. Another problem
is that 69000 twips would be almost fifty inches from the
left margin, way beyond the width of the paper. Maybe you
meant 6900 instead??
As far as the meaning of Step, it is used to indicate that
the second set of coordinates are relative to the first set.
The 0 in Step(0, ...) means that the line ends at the same X
coordinate as its starting point, i.e. it's a vertical line.
It could be written without Step:
Me.Line (6900, 0) - (6900, 10000)
Ordinarily, I'd respond to this kind of question by telling
you to look it up in Help. Unfortunately, the later
versions af Access Help is at best difficult to use, and in
the case of the Line method, just plain wrong (it looks as
if they copied/pasted the description from a C man-page?).
Because Help is so messed up, I'll post the help topic from
A97
-------------------------------------------------------------------
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.