I don't want the user to have to change the printer driver before each label run. Is there a way to specify the correct printer to use if printing labels in the report and return to the original default printer afterwards.
use application.printer to chan ge the default and then change back again. Something like
Code:
dim defPrinter as string
' get current default printer.
defPrinter = Application.Printer.DeviceName
' switch to label printer
Set Application.Printer = Application.Printers("name of label printer")
'print the labels
'reset default
Set Application.Printer = Application.Printers(defPrinter)
don't want to train everyone to use the label wizard and format each label new with each query/report
are you saying you have multiple label sizes? When you use the label wizard it creates a report based on the label type selected. Specifically it determines how many columns, how many rows and the height of the detail section based on your label selection. The text created to be printed is just one large text box with the different fields concatenated together. - create a label and go into design view to see what I mean.
so if you don't want to train them to use the label wizard, either provide all reports for different label sizes/orientations etc and let them select from a list. Or you will need to store the parameters yourself so you can adjust a single report for columns, margins etc