print form button

lipin

Registered User.
Local time
Today, 23:01
Joined
May 21, 2002
Messages
149
I have a command button to print the form on the screen. Is there a way to change the default printer either just for this application or this button?? The default printer for the workstation is in the supervisor's office (not convenient) and that is where most of the work needs to be printed, but not this form. There is one much more convenient that I would like the form to print on. Can you hard code it behind the print form button??
 
Maybe you need the command button to be Print Preview and change the printer from print preview.
 
But the command button is "wizard" built and doesn't give an option to open to preview. It acts more like a print screen.

Here's the code behind it; is there anything I can add to specify a printer?

Private Sub PrintNotice_Click()
On Error GoTo Err_PrintNotice_Click
Dim stDocName As String
Dim MyForm As Form


stDocName = "frmErrorNotice"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True

DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
DoCmd.Close

Exit_PrintNotice_Click:
Exit Sub

Err_PrintNotice_Click:
MsgBox Err.Description
Resume Exit_PrintNotice_Click

End Sub
 
Forms are not really intended for printing, use a report instead
 
Okay....Duh....

Open the form then click on the Print Preview button in the toolbar. That should do the trick.
 

Users who are viewing this thread

Back
Top Bottom