473,320 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Vertical lines not printing or exporting...

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
3 2688
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kenneth | last post by:
Okay, I've been scouring Google for hours looking for a solution to this problem, but as of yet I can't find one. XHTML Transitional seems to specify that I can no longer set a table's height to...
10
by: John Baker | last post by:
Hi: I have a user who has labels that are set up 3 across and 11 vertical (which is unusual at best), and he wants me to print names and addresses on them. I have already set up for labels 10...
0
by: DraguVaso | last post by:
Hi, I'm having a DataGrid on which I want to draw 2 moveable vertical lines. What should happen is: When I move a vertical line, I have somewhere an indication on which character in the datagrid...
2
by: Eric Lindsay | last post by:
If I want to have the middle of an image vertically aligned with the middle of a heading (or several lines of heading), is there some particular way people would recommend? vertical-align: center...
1
by: tminihan | last post by:
I have a report that pulls it's information from a text file. I have the report (Invoice) set up to print some of it in vertical and some of it in portrait. Problem: the verticle won't select...
3
by: acunnon | last post by:
I am trying to put together an login page my problem is getting the three items aligned to the middle verticaly without specifing a height to anything on the page. CSS html{ height:100%;...
3
by: Spiros Bousbouras | last post by:
The fact that vertical tab and form feed exist both in the basic source character set and the basic execution character set suggests to me that there is a class of display devices where vertical...
1
by: mailjaneen | last post by:
Hello, can someone help me. I want to display some fields on a report in print preview (i.e. instructions), that I don't want to print to the printer or export to file. I can't seem to find any...
40
by: maya | last post by:
hi, how do I get text to vertical-align inside a div? http://www.mayacove.com/misc/home.html vertical-align should work, according to this:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.