Solved

in vba how do set the default printer?

Posted on 2000-02-25
1
374 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 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 50 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now