470,575 Members | 1,222 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,575 developers. It's quick & easy.

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 2160

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by vulcaned | last post: by
4 posts views Thread by Geir Baardsen | last post: by
1 post views Thread by KevinK | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.