me.line method only works sometimes

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
 
A

Adrian

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

Adrian
 
R

Rick Brandt

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.
 
A

Adrian

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
 
M

Marshall Barton

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
 
R

Rick Brandt

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.
 
A

Adrian

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top