473,385 Members | 1,606 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,385 software developers and data experts.

How do I write code to allow user of a runtime distro to select a DEFAULT printer?

MLH
I would like to allow users to set, as an application default, a
specific printer to send reports to. I don't know how to bring up
a list of valid print devices in A97, nor do I know how to reference
any one of them that might be selected.

For instance, if I click Start, Control Panel, Printers and Faxes on
a PC running XP and I see the following:
HP Laser Jet 4200 PCL 6
HP Laser Jet 4200 PCL 5e
HP Laser Jet III
HP PhotoSmart 7350 series
Jaws PDF Creator
PDF995
WinFax (Photo Quality)
WinFax

How do I reference those in A97? I can write the default printer name
to a table (tblUserSetupConfigs) if VBA can use the name to tell XP
what printer to use on each print job. If it were the default windows
printer, none of this would be necessary. But if the user desires the
runtime app's prints to go to another printer - then I'll have to
explain to Access what printer to use - writing code that'll look up
the chosen print device in a table and so on.
Nov 13 '05 #1
2 2090
Albert Kallal has a utility for setting the printer in earlier versions of
Access. The A97 link is:
http://www.members.shaw.ca/AlbertKal.../printch97.zip

For a more detailed programming description, see this chapter from Ken Getz
et al:
http://msdn.microsoft.com/archive/de...softAccess.asp

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MLH" <CR**@NorthState.net> wrote in message
news:g8********************************@4ax.com...
I would like to allow users to set, as an application default, a
specific printer to send reports to. I don't know how to bring up
a list of valid print devices in A97, nor do I know how to reference
any one of them that might be selected.

For instance, if I click Start, Control Panel, Printers and Faxes on
a PC running XP and I see the following:
HP Laser Jet 4200 PCL 6
HP Laser Jet 4200 PCL 5e
HP Laser Jet III
HP PhotoSmart 7350 series
Jaws PDF Creator
PDF995
WinFax (Photo Quality)
WinFax

How do I reference those in A97? I can write the default printer name
to a table (tblUserSetupConfigs) if VBA can use the name to tell XP
what printer to use on each print job. If it were the default windows
printer, none of this would be necessary. But if the user desires the
runtime app's prints to go to another printer - then I'll have to
explain to Access what printer to use - writing code that'll look up
the chosen print device in a table and so on.

Nov 13 '05 #2
MLH
Thank-you, Allen. That's a nice contribution Albert made.
I like it a lot.
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Uros | last post by:
Does anybody know how to write data directly to the LPT port from MSAccess. Now I use "Open PrtPort For Append Access Write As IntFilenum" then "Print $IntFilenum, ..........." but doesn't work...
4
by: Andrew | last post by:
My VB Application opens an Access Report and has an option to generate the report in PDF once the report is closed. This is accomplished by: - Switching over to the Acrobat Printer (i.e....
2
by: PC User | last post by:
I found some VB code to printout a richtext field and I'm trying to adapt it to MS Access 2000. I think there might be some small changes to make the adaption between VB versions. Also my OS is...
2
by: enough2Bdangerous | last post by:
Access database (file format 2002-2003) generates reports with docmd.openreport but returns 3011 runtime error related to the printer. Switching Windows default printer is a work around but need to...
3
by: enough2Bdangerous | last post by:
access runtime error 3011 on docmd.openreport -------------------------------------------------------------------------------- Access database (file format 2002-2003) generates reports with...
1
by: Scott | last post by:
Hello- I have a contol button on a form that I want to code to open a report (rptReviews), then display the print dialogue box so that users can select a printer. This report needs color, but...
9
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= | last post by:
I have an app that prints entry tickets. If the printer driver is not set up exactly to detect the black mark on the back of the ticket, the tickets do not print correctly. Because of this, all...
1
by: Ron | last post by:
Hi All, I'm using A2K and need to print a specific pre-printed form. I know that once I have that report on a particular computer screen I can select "Page Setup" and change the margins to get...
3
by: Hazza | last post by:
Hi, I am using PHP and mysql to create a website. I am fairly new to PHP, and thus am grateful to anyone who helps! Firstly I am running a homepage, that displays additional content if a user...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.