L
Lamar
I have reports that should print to specific printer. So for those reports
I went into page setup and change it to the specific printer "My Printer".
Problem - Now all the reports in my database have "My Printer" as their
default printer. I do not want this. I only want "My Printer" for reports I
designate as such. For these other reports I want it to print to user's
default printer.
And "My Printer" is not the default printer when I go "Printer and Faxes" on
my computer. At first I did try to use the following code to make the
designated reports print to "My Printer" Do think this is the problem? Any
help is appreciated.
Dim dpfr as Printer
'Set variable to default printer
Set dfpr = Application.Printer
'Set default printer to My Printer
Set Application.Printer = Application.Printers("My Printer")
'Print report
DoCmd.OpenReport stReportName, acNormal
DoCmd.Close acReport, stReportName, acSaveNo
'Set printer back to default printer
Set Application.Printer = dfpr
I went into page setup and change it to the specific printer "My Printer".
Problem - Now all the reports in my database have "My Printer" as their
default printer. I do not want this. I only want "My Printer" for reports I
designate as such. For these other reports I want it to print to user's
default printer.
And "My Printer" is not the default printer when I go "Printer and Faxes" on
my computer. At first I did try to use the following code to make the
designated reports print to "My Printer" Do think this is the problem? Any
help is appreciated.
Dim dpfr as Printer
'Set variable to default printer
Set dfpr = Application.Printer
'Set default printer to My Printer
Set Application.Printer = Application.Printers("My Printer")
'Print report
DoCmd.OpenReport stReportName, acNormal
DoCmd.Close acReport, stReportName, acSaveNo
'Set printer back to default printer
Set Application.Printer = dfpr