GeoffS Level: VB Lord

 Registered: 29-09-2004 Posts: 536
|
Re: Different printers in access
Ah - In that case I presume that you call DoCmd.PrintOut from a Button_Click Event. So put the CommonDialog Control on your Form and in your Event procedure just before the PrintOut call add the line -
CommonDialog1.ShowPrinter
This will give users the opportunity to choose Printer before the PrintOut executes.
But - remember, this will change the computers default printer unless you set the CommonDialog Control property "PrinterDefault" to False - by default there will be a Tick against this property in the Property Pages (Not the standard Access Property Page that comes up when you select Properties after a right click on the control in Design, select "CommonDialog Object" at the top of that PopUp, then "Properties".)
Whilst you are setting these properties it is a good idea to put a Tick against "CancelError", which by default is set to false. This will enable you to trap a users click on the "Cancel" button and exit the procedure without running the PrintOut.
Hope that helps.
____________________________
multi-tasking - the ability to hang more than one app. at the same time.
|