"Page border" via vb not printing out.

  • Thread starter Thread starter StargateFan
  • Start date Start date
S

StargateFan

Good Evening!

I got this code from the archives of access.reports and on the print
preview, the page border displays perfectly:

****************************************************************
Private Sub Report_Page()
Me.DrawStyle = 0 ' 0 = (Solid Line) thru 6 = (invisible line)
' ALL NUMBERS ARE PIXELS...
Me.DrawWidth = 6 ' set the thickness of the line
' Draw a box (the border!) around the page.
Me.Line (0, 0)-(Me.ScaleWidth, Me.ScaleHeight), , B

End Sub
****************************************************************

However, nothing ever shows up in the printout. I must be doing
something wrong. I used line width values from 1 to 6 and test each
by printout out but no borders show up.

Is this perhaps not the right code to use? Kinda weird to have lines
on the screen that don't show on the paper page <g>.

Thanks. :oD
 
I copied and pasted your code in a report's Page event and it shows on the
screen and on the paper.

Are your margins outside the printable area of your printer? The code will
place the box at the margins that have been set in Page Setup (i.e. if the
margin is 1", the box will be 1" from that edge of the paper). If the margin
is too small, you may be beyond the printer's capabilities. If you've
allowed space between the edge of the report and where the controls are (in
design view) you may have the controls inside the printer's capabilities,
regardless of where you've set the page margins.

Have you set the printer driver to "draft mode" or "ink saving mode" or some
other reduced resolution printing method?
 
I copied and pasted your code in a report's Page event and it shows on the
screen and on the paper.

Are your margins outside the printable area of your printer? The code will

I don't know if they are but I imagine that you've hit the nail on the
head. It just seems right that the answer lies there esp in this
particular report where the space is so small and everything is pretty
tightly together. I'll go to the db now and try to see if I can
figure this out.
place the box at the margins that have been set in Page Setup (i.e. if the
margin is 1", the box will be 1" from that edge of the paper). If the margin
is too small, you may be beyond the printer's capabilities. If you've
allowed space between the edge of the report and where the controls are (in
design view) you may have the controls inside the printer's capabilities,
regardless of where you've set the page margins.

Hmmm, yes, makes perfect sense.
Have you set the printer driver to "draft mode" or "ink saving mode" or some
other reduced resolution printing method?

Hey, yes - I never thought of that! I have it on the lightest setting
possible; in my HP inkjet, that means "fast draft". Will see what
using any of the other settings will produce.

<g> Where would I be without you guys???!!! I'd never think of all
these things to look for.

Thanks. Cheers. :oD
 
Back
Top