473,320 Members | 2,193 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,320 software developers and data experts.

Default Printer in report set by Access and not by me

Hi there,

I have created an Access 2002 db which contains several reports. Some
reports need to be printed on a Laserjet and others on a Labelprinter.
One of my clients wants to be able to print the same reports to 3
different laserjets and to 3 different labelprinters. (They work with
the db on 3 different units each with their own Laserjet and
Labelprinter)
For each unit there is a copy of all the reports.
The client can make a unit profile in which the specific printers for
that unit are defined.
When the client wants to print a report, I check whether the printer
defined for the unit is the same as the printer defined in the report.
I use DevNames for that.
To prevent the report having to open in Design view every time the
client prints, (they print a lot every day), I save the string with
the devicename, driver and port into a table for each report and then
check whether that is the same as the devicename, driver and port
defined for that unit.
In principle this works really well.

One of the main problems we seem to have now is when a printer has
been defined with the same name as the printer for a specific unit,
but in fact is not that printer. (all 3 Laserjets are the same kind
and all 3 labelprinters as well, so the drivers are the same and often
the port as well). Of course different printers should have different
names, but at the moment that is not the case.
With my check it seems as if the printer is the right one, so the
report just prints, without resetting the DevNames. But then the
report can't find the specific printer and then prints to the Default
Windows Printer. That is fine in itself. But when the right printer
has been defined on the workstation later on, even though my code does
go through resetting the DevNames, the report does not change from
Default Printer. (Whereas if I use this code to set the report to
Default Printer and then reset it using code to Use Specific Printer
it works like a charm)

What can I do to either:
- Prevent Access from setting a report to Default Printer on it's own
volition.
- Check whether a report is set to Default Printer and somehow change
that (which is actually what I'm doing but doesn't seem to work)
- Clear the printer settings of a report and set them all over again
(start with a clean slate as it were)

Any suggestions are very welcome.

Thanks
Esmee
Nov 12 '05 #1
0 2539

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

Similar topics

16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
1
by: vulcaned | last post by:
Hi All, In an Acces97 application I have a report which in design mode I set the right/left print margins to 0.5" The report, for several user now does not print using the default values that...
4
by: Geir Baardsen | last post by:
Hi! Is there any way to check if printer is active in access 2000? I have a report that is printing (local printer), and before I do anything more in code, I do want to check if printer is...
1
by: KevinK | last post by:
Hi, I want to print my crystal report without showing a preview of the report. So I use the myreport.ReportSource.PrintToPrinter(2, True, 0, 0) command, but when doing so I get an exception...
1
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...
1
by: groulder | last post by:
hi all, i have a problem with a network database that's used by a lot of people. people are finding, they will start the database, and if the mouse is moved over the print icon, the tooltip...
3
by: MLH | last post by:
Access 97 Q: Can I examine a report object property setting in VBA and tell whether the report is setup to print to a specific printer or to the windows default printer? You know, the setting...
6
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...
3
by: brianflannery | last post by:
Greetings all! My problem is this. I've installed a new printer on my computer. This is the "default printer" for access. Now, some of my reports, which were working fine with the old printer,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.