By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,078 Members | 2,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,078 IT Pros & Developers. It's quick & easy.

Vertical lines not printing or exporting...

P: n/a
I have been trying to get vertical lines to work in a report using VBA
code as suggested by Microsoft here:
http://support.microsoft.com/kb/q151543/ (except I replaced Microsoft's
default line values with my own):

Private Sub Report_Open(Cancel as Integer)
DoCmd.Maximize
End Sub
Private Sub Report_Close()
DoCmd.Restore
End Sub

Private Sub Report_Page()

If Me.Page <1 then

Me.ScaleMode = 1
Me.ForeColor = 0
' Repeat the following line of code for each vertical
line.
' 1 * 1440 represents 1 inch.
' Draws line at Left Margin.
Me.Line (0 * 1440, 0) - (0 * 1440, 14400)
' Draws line at 1 inch.
Me.Line (1 * 1440, 0) - (1 * 1440, 14400)
' Draws line at 2 in.
Me.Line (1.9 * 1440, 0) - (1.9 * 1440, 14400)
' Draws line at 3 in.
Me.Line (5.5 * 1440, 0) - (5.5 * 1440, 14400)

End If

' The 14400 is an arbitrary number to increase the line to the
max
' of a section.
End Sub
Private Sub Detail_Print(Cancel as Integer, PrintCount as Integer)
Me.ScaleMode = 1
Me.ForeColor = 0
' Repeat the following line of code for each vertical line
' 1 * 1440 represents 1 inch.
Me.Line (0 * 1440, 0) - (0 * 1440, 14400)
Me.Line (1 * 1440, 0) - (1 * 1440, 14400)
Me.Line (1.9 * 1440, 0) - (1.9 * 1440, 14400)
Me.Line (5.5 * 1440, 0) - (5.5 * 1440, 14400)

' The 14400 is an arbitrary number to increase the line
' to the max of a section.
End Sub

The lines show up in the print preview and look great, but they don't
print and when I export the report to PDF or Word, the lines dissapear
there too. Is there a way to fix this?

Jul 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Try increasing the line thickness slightly.

For example ....

Me.Line (0, 0) - (2, 14400), vbBlack, BF
Me.Line (1440, 0) - (1442, 14400), vbRed, BF
Me.Line (2880, 0) - (2882, 14400), vbBlue, BF

This should fix the print and pdf, but unsure about word.

Regards,
Kevin Rollo
Western Australia
"CatMarieS" <Sp************@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
I have been trying to get vertical lines to work in a report using VBA
code as suggested by Microsoft here:
http://support.microsoft.com/kb/q151543/ (except I replaced Microsoft's
default line values with my own):

Private Sub Report_Open(Cancel as Integer)
DoCmd.Maximize
End Sub
Private Sub Report_Close()
DoCmd.Restore
End Sub

Private Sub Report_Page()

If Me.Page <1 then

Me.ScaleMode = 1
Me.ForeColor = 0
' Repeat the following line of code for each vertical
line.
' 1 * 1440 represents 1 inch.
' Draws line at Left Margin.
Me.Line (0 * 1440, 0) - (0 * 1440, 14400)
' Draws line at 1 inch.
Me.Line (1 * 1440, 0) - (1 * 1440, 14400)
' Draws line at 2 in.
Me.Line (1.9 * 1440, 0) - (1.9 * 1440, 14400)
' Draws line at 3 in.
Me.Line (5.5 * 1440, 0) - (5.5 * 1440, 14400)

End If

' The 14400 is an arbitrary number to increase the line to the
max
' of a section.
End Sub
Private Sub Detail_Print(Cancel as Integer, PrintCount as Integer)
Me.ScaleMode = 1
Me.ForeColor = 0
' Repeat the following line of code for each vertical line
' 1 * 1440 represents 1 inch.
Me.Line (0 * 1440, 0) - (0 * 1440, 14400)
Me.Line (1 * 1440, 0) - (1 * 1440, 14400)
Me.Line (1.9 * 1440, 0) - (1.9 * 1440, 14400)
Me.Line (5.5 * 1440, 0) - (5.5 * 1440, 14400)

' The 14400 is an arbitrary number to increase the line
' to the max of a section.
End Sub

The lines show up in the print preview and look great, but they don't
print and when I export the report to PDF or Word, the lines dissapear
there too. Is there a way to fix this?
Jul 8 '06 #2

P: n/a
"Kevin Rollo" <kr*******@hotmail.comwrote in
news:44***********************@per-qv1-newsreader-01.iinet.net.au:
The lines show up in the print preview and look great, but they
don't print and when I export the report to PDF or Word, the lines
dissapear there too. Is there a way to fix this?
The RTF export to Word does not include any of the lines or boxes in
the report. This has basically made me consider the RTF export
worthless.

Printing to PDF directly from Access ought to get them, though.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 8 '06 #3

P: n/a
With care, the RTF export can be used as a mail merge source
in Word, which may be it's only value.

It's not uncommon for PDF to loose lines: some of the pdf
printers seem to have the same problem as Lebans found when
he started the snapshot to pdf converter.

It used to be common for printers to loose lines and boxes,
because they were handled as special cases: they are
graphics that can be represented as characters. It's possible
that some PDF printers or converters just have bugs in the
line handling.

(david)

"David W. Fenton" <XX*******@dfenton.com.invalidwrote in message
news:Xn**********************************@127.0.0. 1...
"Kevin Rollo" <kr*******@hotmail.comwrote in
news:44***********************@per-qv1-newsreader-01.iinet.net.au:
>The lines show up in the print preview and look great, but they
don't print and when I export the report to PDF or Word, the lines
dissapear there too. Is there a way to fix this?

The RTF export to Word does not include any of the lines or boxes in
the report. This has basically made me consider the RTF export
worthless.

Printing to PDF directly from Access ought to get them, though.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Jul 10 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.