Check alle échte Black Friday-deals Ook zo moe van nepaanbiedingen? Wij laten alleen échte deals zien

[Access 2.0] Verkeerde printer

Pagina: 1
Acties:

  • YellowOnline
  • Registratie: Januari 2005
  • Laatst online: 28-03-2023

YellowOnline

BEATI PAVPERES SPIRITV

Topicstarter
Neen, dat was geen typefout. :+

Ik heb iemand met een Access 2.0-applicatie die niet te overtuigen valt om te migreren. Hij was verbonden met een oude printserver die ik definitief uitgeschakeld heb en nu moet ik natuurlijk oplossen dat hij weer kan printen.

Vroeger: SERVER1\Printer1
Nu: SERVER2\Printer1

In zijn Windows is die printer goed geconfigureerd en hij werkt ook. Alleen vanuit zijn applicatie blijft dat ding proberen printen naar SERVER1\Printer 1 - wat natuurlijk niet gaat. Alle instellingen in Access zijn zoals Windows op het eerste zicht: hij neemt die gewoon over. Ik ben nu door de code aan het struinen, maar Access 2.0 (in het Duits bovendien) is niet echt intuïtief. Heeft iemand een idee waar zo'n instelling nog verstopt kan zijn?

UPDATE

Ik heb zelf een DBtje gemaakt, eens van daar uit geprint en nu doet de andere het ook. Heeft (had) Access een eigen printercache of zo? :s

[ Voor 9% gewijzigd door YellowOnline op 12-08-2015 17:32 ]


  • nescafe
  • Registratie: Januari 2001
  • Laatst online: 19:18
Voor de geïnteresseerden :+ ; hier staat uitgelegd hoe je de printer per form of report kunt aanpassen.

[quote=https://support.microsoft.com/en-us/kb/129397]
Method 1: Changing the Microsoft Windows Default Printer
In the Page Setup (or Print Setup in version 2.0) dialog box, you can choose whether forms or reports are printed by either a default printer or a specific printer. If you choose a default printer, the form or report is printed to the Microsoft Windows default printer. If you want to change to another default printer, you must change the Microsoft Windows default printer.
To change the Microsoft Windows default printer using Visual Basic code (or Access Basic code in version 2.0 or earlier), use WriteProfileString to change the Device= entry of the Microsoft Windows section of the Win.ini file.

Method 2: Setting the PrtDevNames and PrtDevMode properties
The PrtDevNames property stores the name of the printer, and the PrtDevMode property stores the driver information. Both of these properties need to be changed in order to change the printer driver. If the PrtDevMode property does not match the PrtDevNames property (that is, the PrtDevMode property describes a different driver than the PrtDevNames property) a General Protection (GP) Fault may occur.

To change the printer driver, you must do the following:
[list]
• Open a form or report in Design view.
• Set the PrtDevNames property.
• Retrieve and set the PrtDevMode property.


In order to set the PrtDevMode property to the appropriate structure, the driver information must be obtained. There are several ways to obtain this information:
  • Retrieve the information from a previously saved form or report that uses the desired printer.
  • Call the driver and retrieve the structure. In order to call the driver, a separate DLL is needed. This is because calls to functions in outside files must be declared ahead of time and the driver name will not be known. Instead, call a DLL that determines the correct printer driver to call and retrieves the DevMode structure.
  • Use the Windows Print Common Dialog.
Kennelijk stond 'ie bij jou dus gewoon op default, alleen had ik dan gedacht dat dat bij een application restart wel gereset zou zijn naar de windows default printer..

* Barca zweert ook bij fixedsys... althans bij mIRC de rest is comic sans