Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

in vba how do set the default printer?

Posted on 2000-02-25
1
Medium Priority
?
412 Views
Last Modified: 2008-03-10
i am developing a form for colleagues to enable them to choose which report to print, the number of copies and on which printer.  Colleages do this by using a series of combo boxes listing the alternatives.

i can write code to select the report and number of copies but i don't know how to select the printer.  if possible i want this to be done automatically without the print dialogue box appearing.  however if the print dialogue box has to appear i can work with that.

thanks  clint9898
0
Comment
Question by:nigelrichards
1 Comment
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 200 total points
ID: 2557925
Depends on how much control you want over the process.  You can simply popup the built in dialog and let the user choose, but it sounds like you want more then that.

In Access, to control the printer, you need to handle the PrtDevNames and PrtDevModes properties of the report.  Lot's of code has been published to handle this and I would suggest purchasing it in one way or another.  This is far cheaper and simpler then reinventing the wheel.

  The Access XX Developers Handbook published by Sybex is a good source for such code.  The print code is available on-line at:

http://www.microsoft.com/AccessDev/Articles/GetzCh10.html

  Another good source for print control code is:

http://ourworld.compuserve.com/homepages/attac-cg/

  ATTAC markets a product called "on the fly printing" and is well worth the price.  Check out the web site.

HTH,
Jim.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

927 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