Wendy:
You don't actually need to do this as Dennis suggested (Opening in design
mode). However, you do need to use Visual Basic for Applications to
accomplish your goal in Access 2002 and greater, it can't be done purely as
a macro.
VB provides the ability to address and change Access' printer object, which
when set, tells Access which printer to use when printing reports (provided
the report is set to use the default printer in their File -> Page Set Up ->
Page setting.)
You can do this using two small functions like those shown below and call
them from your macro using the RunCode Macro call, supplying the report name
and the name of the printer as it appears on your machine in the print
dialog box (e.g. \\SomeServer\SomeNetworkPrinter )
Hope this helps
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg
----------Cut and Paste Into VB Module---------------
Public Function PrintReportToPrinter(strReportName as String, _
strPrinterName as String, _
Optional strWhere as String)
On Error GoTo ErrHandler
'Set the Target Printer
Call SetAppPrinter (strPrinterName)
Do Events
'Send the Report
If Len(strWhere) >0 Then
DoCmd.OpenReport strReportName, acViewNormal, , strWhere
Else
DoCmd.OpenReport strReportName, acViewNormal
End if
ExitProc:
Exit Function
ErrHandler:
MsgBox "Error: " & Err.Number & " " & Err.Description
Resume ExitProc
End Function
Private Sub SetAppPrinter(strPrinterName As String)
On Error Resume Next
Dim objPrn As Object
Dim App As Object
Dim strPrinter As String
Set App = Application
If Val(SysCmd(acSysCmdAccessVer)) >= 10 Then
For Each objPrn In App.Printers
strPrinter = objPrn.DeviceName
If strPrinter = strPrinterName Then
Set App.Printer = objPrn
End If
Next
End If
End Sub
-------------end code---------------