What I did in my application was included a second list box with the names of
the reports that the user could print then I used the following code to set
the printer and output the report.
Dim stDocName As String
stDocName = Me.lstReports.Value()
If Len(stDocName) > 0 Then
'open the report in a hidden window
DoCmd.OpenReport stDocName, acViewPreview, , , acHidden
'set up printer
Reports(stDocName).Printer = Application.Printers(Me.lstPrinters.
ListIndex())
Reports(stDocName).Printer.Copies = Me.txtNumCopies.Value()
DoCmd.OpenReport stDocName, acNormal
End if
Its seems a bit convoluted, but it works. There is probably a much better way
of doing it.....
Gina
Worked like a charm. Now, is there an easy way to set the selection as the
printer for that report ONLY?
Thanks!!
Create a form with a listbox on it and use the following code:
[quoted text clipped - 21 lines]