[RESOLVED] VBA Printing from access
im using the following code to print the current record of the form
i was wondering if it is possible to specify in it which printer you would like to print to or display the print dialog even
Code:
Private Sub Print_Record_Click()
On Error GoTo Err_Print_Record_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection
Exit_Print_Record_Click:
Exit Sub
Err_Print_Record_Click:
MsgBox Err.Description
Resume Exit_Print_Record_Click
End Sub
Re: VBA Printing from access
Here is how you can set a specific report to use a specific printer.
VB Code:
Dim oReport As Report
DoCmd.OpenReport "Report1", acViewPreview, , , acWindowNormal
Set oReport = Application.Reports("Report1")
Set oReport.Printer = Application.Printers(0) 'Change to printer index you desire.
DoCmd.PrintOut acSelection
Re: VBA Printing from access
will that work for printing forms or just access reports
also how is it possible just called the print dialog from the file->print menu