Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command button Printing

Status
Not open for further replies.

OwenHall

Technical User
Jul 23, 2002
21
GB
I need to print a form to a printer whenever a new record button is pressed. It has to be a specific printer. Does anyone know what code to use and controls?
 
You could use some code like

Dim stDocName As String
Dim MyForm As Form

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

In the form, go to file, then page setup, then Page, you can specify a printer to print on from there.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top