X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Printing To A Second Printer, Access 2016    
post Oct 31 2019, 10:45 AM

Posts: 1,178
Joined: 17-November 03
From: Hamburg, NY

We have two printers, Front Copier and Canon, each needed for different print jobs.

Front Copier is the default printer for the whole office.
When an individual needs to do a Canon print job I use the following code.

Dim strDefaultPrinter
    strDefaultPrinter = DefaultPrinter
    'Set to Printer used for Appointment Cards.
    Shell "RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n ""\\KAZSRV\Canon MG6200"""
                 'Print job instructons (reports are set to print to the Default Printer in the design view.)
    'Restore original printer
    Shell "RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n """ & strDefaultPrinter & """"

Prior to switching the office from Win7 to Win10 this never caused a problem, since the switch to Win10 sporadically the job intended for the Canon will go to the Front Copier.

The only pattern we think exists has to do with what print job was done before Canon job was initiated. We initiated printing an Invoice which is intended to go to Front Copier, and it did. Then we initiated a Appointment Card which is intended to go the Canon, but it went to the Front Copier. Then we closed the application and reopened it went to the same form and initiated the same Appointment Card and it printed to the Canon.

The same code is used in another form to print the same Appointment Cards and it always gets it right.

Any thoughts

When the eagle is away, the crow says, "I am the eagle."
Go to the top of the page
post Oct 31 2019, 03:44 PM

Posts: 1,414
Joined: 25-January 16
From: The Great Land

Rebuild the form as see if issue persists.

Weirdness often means corruption.

Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Go to the top of the page
post Nov 1 2019, 04:33 AM

UtterAccess Editor
Posts: 10,636
Joined: 8-November 07
From: South coast, England

Would this approach help

Warm regards
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    1st June 2020 - 02:07 PM