?
Solved

Microsoft Access printer orientation problem

Posted on 2006-05-08
2
Medium Priority
?
686 Views
Last Modified: 2008-01-09
I have an application that prints several different types of reports in Microsoft Access
I am attempting to send the mailing label report to the costar label printer and set the orientation to landscape
I am using the following code:

Dim strDefaultPrinter As String
              strDefaultPrinter = Application.Printer.DeviceName
              Set Application.Printer = Application.Printers("Costar printer")
              Application.Printer.Orientation = acPRORLandscape

It sends the report to the printer, but ignores the orientation.  Please help...

Thanks

0
Comment
Question by:power1007
2 Comments
 
LVL 18

Accepted Solution

by:
Jose Parrot earned 1500 total points
ID: 16635575
I'm quite confuse. Seems as a report sent to the costar label printer.

Anyway, I didn't noticed in the code if the printer object was created before invoke the printer.
Something like:

' Variable for the printer object.
Dim prt As Printer

Also, the code reffers to the costar printer as the default printer, but the default could be another one, for instance the one that you use to print full page reports.

So, probably the code is working properly for the default printer, not for the costar.

Jose


0
 

Author Comment

by:power1007
ID: 16757482
Yes, I had already instansiated the printer.  The simple solution was to change the properties on the page setup of the report and specify a printer there.  Thanks for the help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Progress

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question