me.line method only works sometimes

  • Thread starter Thread starter Adrian
  • Start date Start date
A

Adrian

Access 2003

I am trying to use the Me.Line method to draw vertical lines, but it only
works sometimes depending on starting point of the line and how tall the
line is.

For example:

Me.Line (442, 0)-Step(0, 1440) draws a vertical line
Me.Line (443, 0)-Step(0, 1440) no line appears
Me.Line (443, 0)-Step(0, 635) draws a vertical line
Me.Line (443, 0)-Step(0, 636) no line appears
Me.Line (494, 0)-Step(0, 1440) no line appears
Me.Line (495, 0)-Step(0, 1440) draws a vertical line

I am trying to work out why it is behaving like this. Any suggestions?

Thanks,

Adrian
 
It appears this behaviour is only on Preview. If I print the lines always
appear.

Adrian
 
Adrian said:
It appears this behaviour is only on Preview. If I print the lines
always appear.

Have you tried different zoom levels while in preview? Depending on Video
card, resolution setting, and monitor, sometimes a default width line
(hairline) will not display in preview mode even though it is actually
there. Different zoom levels will usually let you see it.
 
Rick Brandt said:
Have you tried different zoom levels while in preview? Depending on Video
card, resolution setting, and monitor, sometimes a default width line
(hairline) will not display in preview mode even though it is actually
there. Different zoom levels will usually let you see it.

Rick,

Thanks. I have a number of vertical lines on the report and you are right.
Different zoom levels does affect it. Unfortunately it affects lines in
different positions differently so some appear, but others disappear! Not
very satisfactory. The width line does not seem to affect it.

Adrian
 
Adrian said:
Access 2003

I am trying to use the Me.Line method to draw vertical lines, but it only
works sometimes depending on starting point of the line and how tall the
line is.

For example:

Me.Line (442, 0)-Step(0, 1440) draws a vertical line
Me.Line (443, 0)-Step(0, 1440) no line appears
Me.Line (443, 0)-Step(0, 635) draws a vertical line
Me.Line (443, 0)-Step(0, 636) no line appears
Me.Line (494, 0)-Step(0, 1440) no line appears
Me.Line (495, 0)-Step(0, 1440) draws a vertical line


Definitely odd, but there are several scenarios where lines
do not appear when either previewed and/or printed. Most
all the cases I've seen are related to rounding the screen
or printer resolution from the coordinates of a line and the
line's width. In these situations, the first thing to try
is to make the line thicker. For the Line method, the width
of the line can be specified via the report's DrawWidth
property. For example:
Me.DrawWidth = 3
 
Adrian said:
Rick,

Thanks. I have a number of vertical lines on the report and you are
right. Different zoom levels does affect it. Unfortunately it affects
lines in different positions differently so some appear, but others
disappear! Not very satisfactory. The width line does not seem to
affect it.
Adrian

Printer driver settings can help in some cases or even using a color other
than black.
 
Rick Brandt said:
Printer driver settings can help in some cases or even using a color other
than black.

Thanks to everyone for their suggestions. I will continue to play around
with the various settings.

Adrian
 
Back
Top