[AccessD] Dynamic Default Printer

Paul Hartland paul.hartland at googlemail.com
Mon Oct 23 11:20:40 CDT 2023


We had a few card printers setup, but everyones system was set to a normal
printer as default, when they wanted to print a card, instead of changing
the printer in the report, we would do it in the application before even
opening the report, we would store the name of the card printer against
their app login, then when they clicked to print a card, we would loop
through the available printers, see if their card one was available and set
that as default open/print the report to print the card, then back to their
original printer.

Paul

On Mon, 23 Oct 2023, 16:37 Ryan W, <wrwehler at gmail.com> wrote:

> Hey all,
>   I've got what was once just a lone Zebra printer to print labels and all
> the reports that used to generate those labels were bound to that specific
> printer.
>
>   Now we are considering adding more so we don't just have one.
>
>   I was thinking of setting them all up as shared TCP/IP printers off a
> windows server, and depending on the department or side of the building
> connect those workstations to that specific printer.
>
>   I think the problem there will be that they cannot all be named "Zebra
> Printer" (even if I try and change the name on the local machine it tries
> to change the share name).  So we have Zebra North, Zebra South, Zebra
> East.
>
>   I'm tinkering around with catching the current Application.Printer name,
> changing it to the appropriate Zebra name and then back when the report for
> the labels is closed.
>
>  This seems to work OK if I wrap DoCmd.OpenReport is some code to change
> the default printer (or a function that does the change, open and revert).
>
>  What I was wondering is, is there a way to do this in the report_load,
> report_open, report_close or report_unload event? So far when I do that the
> paper size exceeds the label size (probably because it's trying to use the
> 'actual default printer' properties, which were set as the report opened
> and the code had yet to run?)
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list