473,626 Members | 3,351 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

tools for printer programming in Access 2000!

bla
Hello all,

Does anybody have working sample VBA code to change printerdriver in a
report and to get a list of available drivers and there functionality?

It is for Access 2000. This version of Access has no printer collection
object yet. I need to work with the DevMode and DevNames properties of a
report object.

Please, you help me the most if you sent it to my personal email address,
then I will notice directly if you have a solution. Ofcourse you can post it
to the newsgroup for use by others.

My email address starts with 2face. Then, after the @, it ends with
planet.nl

Thanks

Peter
Nov 12 '05 #1
3 4846
"bla" <da@chello.nl > wrote:
Does anybody have working sample VBA code to change printerdriver in a
report and to get a list of available drivers and there functionality?


Do you mean you want to change printers termporarily? Then you don't need prtDevMode
and such. Which are a lot of work.

You can change the default printer using updates to the INI file and some sample
code. See DefaultPRT.ZIP at http://www.mcwtech.com/downloads.htm

Finally you can use DevPrtMode however this requires extensive VBA knowledge and is
not for the faint of heart. Also this won't work in MDEs as you must open reports in
design mode although you can use Automation to open a reports MDB and manipulate it
there.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 12 '05 #2
bla
Tony, thanks for your quick response.

It is a multi user progam in Access. Problem is, every user has different
printers. I want to use a A3 printer not everyone has (some reports are
designed on a A3 paper). I want so set the printer name before printing.

I am a advanged programmer, but it is a lot of work and pain in the ass. I
guess it will cost me one day before i solved all GPF's I will encounter
when I do all the work from the beginning.

I allready have code to set printer margins, paper size and orientation. I
first open the report in design mode, make the changes, and then open the
report in preview mode. This works.

It spare me a lot of time, when i have some working code and all Windows Api
function declarations i need.

Peter

"Tony Toews" <tt****@teluspl anet.net> wrote in message
news:30******** *************** *********@4ax.c om...
"bla" <da@chello.nl > wrote:
Does anybody have working sample VBA code to change printerdriver in a
report and to get a list of available drivers and there functionality?
Do you mean you want to change printers termporarily? Then you don't need

prtDevMode and such. Which are a lot of work.

You can change the default printer using updates to the INI file and some sample code. See DefaultPRT.ZIP at http://www.mcwtech.com/downloads.htm

Finally you can use DevPrtMode however this requires extensive VBA knowledge and is not for the faint of heart. Also this won't work in MDEs as you must open reports in design mode although you can use Automation to open a reports MDB and manipulate it there.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm

Nov 12 '05 #3
"bla" <da@chello.nl > wrote:
It is a multi user progam in Access. Problem is, every user has different
printers. I want to use a A3 printer not everyone has (some reports are
designed on a A3 paper). I want so set the printer name before printing.

I am a advanged programmer, but it is a lot of work and pain in the ass. I
guess it will cost me one day before i solved all GPF's I will encounter
when I do all the work from the beginning.

I allready have code to set printer margins, paper size and orientation. I
first open the report in design mode, make the changes, and then open the
report in preview mode. This works.

It spare me a lot of time, when i have some working code and all Windows Api
function declarations i need.


Ah, you're already using prtdevmode. See the following article then.

ACC: How to Change a Report's Printer Using Code Q129397
For more information about PrtDevMode and PrtDevNames, search for
"PrtDevMode property" or "PrtDevName s property," using the Microsoft
Access 97 Help Index or please see the following web site:
http://www.microsoft.com/AccessDev/A...s/GetzCh10.HTM

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 12 '05 #4

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

Similar topics

3
8965
by: CH3 | last post by:
Hi, I've not done any programming for years, but I would like to write a simple program/script to help with something at work. We have several print servers for our 2000+ users, and whenever we have to rebuild a user profile we have to add the printers to this profile. The printers are on all print servers for built in redundancy, but it's a pain having to add each one several times. I want to write a simple program so that you enter the...
5
7114
by: Hank | last post by:
My Access 2000 code has been running for several years in our main plant. Now we need to install it, as a stand-along application, at remote sites, some of which are out of state. My problem is the printer destination for special reports such as stickers and mailing labels. The Mailing Label report is, of course, designed here for a specific printer (Mailing Label). At another site, the name could be completely different. Other than...
0
3246
by: Tessa | last post by:
Is there any security reason why you cannot print to a network printer from ASP.NET under IIS6 on Windows 2003 server? I'm using ASP.NET code to print to a server print queue using PrintDocument.Print() (.NET framework v 1.1) I can print to a local printer plugged into LPT1 on the web server, but not to a network printer. The same printing code to a network printer works in a .NET web app when
13
21655
by: Susan Beebe | last post by:
I have downloaded the code described in Microsoft article Q154078. I am trying to send raw ZPL (zebra barcode printer) code from Microsoft access. It works just fine if I hard code the actual data in the string being sent to the printer. However, if I prompt the user for data or if I insert data from a particular record/field in a form Access crashes/closes on its own. I have included the code below, if anyone has any suggestions,...
1
5448
by: i8mypnuts | last post by:
Could someone please help? I am using the 'defaultprt.zip' tool provided by Ken Getz to change the default printer via VBA code (code below). My problem is that once the default printer has been changed, Access 2003 still directs the report to the former default printer. Access 2003 picks up the new default printer setting only after I have reopened the application. I have checked the default printer setting in the OS control panel and the...
8
2875
by: Phil Stanton | last post by:
Using Access 2000 (Yes I know there is no Printer specified) and an MDE File (Yes I know I can't open a report in design view). Is there any way using VBA of temporarily changing the report's printer from the default printer for that report to a PDF995 printer (so that i can print it to a file for subsequent emailing) then back to the default Epsom 830 printer? Thanks for any help Phil
1
2365
by: Gilberto | last post by:
pks00 Expert 280 Posts April 16th, 2007 01:08 PM Re: How to print MS Access 2000 report to PDF995 printer by VBA Code Sweet, your using pdf995, makes answering this question that much easier :)
6
9761
by: Ian | last post by:
I am trying to get MS Access 2000 to print names and addresses onto a Dymo 400 label printer, I have set the Access Report to automatically select the correct printer, then select the label size of “99012 Large Address”. This works fine but when I move my database to another PC (with identical Dymo printer and drivers) the report defaults to the correct printer but does not select the label “99012 Large Address”. On different PC’s it...
3
2199
by: RobEveryThingIsPossible | last post by:
IN VISTA MS Access 2000 Printer Settings Not Saving With Vista Bus. The printer settings (Label or Env.) keep on change back to another setting after saving them on a report or form, when viewing them on other Vista computers. I have tried many things see Example: Open my report in Design mode. Select Page Setup. On the Page tab, alongside Use Specific Printer, press the Printer button. Having selected your printer, press Properties....
0
8196
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8705
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7193
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4092
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4197
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2625
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1808
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1511
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.