472,958 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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
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
- 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.

Nov 12 '05 #1
0 2480

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

Similar topics

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...
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...
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...
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...
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...
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...
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...
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...
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,...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.