Full Version: Printer defaults...
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
dre409
I have a form with a print button on there...

When i hit it .. it prints fine on my PC... but if i move the access app(97) to a different station with different printer default it still prints on my printer..

How can i change it to where it prints on the current printer default..

heres my code behind print button..

Private Sub Command15_Click()
On Error GoTo Err_cmdPrint_Click

Dim stDocName As String
Dim MyForm As Form

stDocName = "Form1"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False

Exit_cmdPrint_Click:
Exit Sub

Err_cmdPrint_Click:
MsgBox Err.Description
Resume Exit_cmdPrint_Click
End Sub


thanks
GhostX1
Go into design view of the form, File and Page Setup, choose the Page tab and click the radio button next to default printer.

Just one note, if you create a report similar to the form it will look a lot nicer.

HTH
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.