By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,807 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,807 IT Pros & Developers. It's quick & easy.

Default printer in Access

P: 76
I have an Access database that is located on the shared drive at work, so it is used by many different people. Is there a way to set a default printer as a LAN for all reports that are printed from this database?

Thanks,

Charlie
Jan 4 '07 #1
Share this Question
Share on Google+
1 Reply


ADezii
Expert 5K+
P: 8,636
I have an Access database that is located on the shared drive at work, so it is used by many different people. Is there a way to set a default printer as a LAN for all reports that are printed from this database?

Thanks,

Charlie
You can change the Default Printer by changing the Printer property of the Application Object to a specific Printer Object. You must also know the DeviceName property for the specific Printer. Here is a routine that changes the Default Printer, prints something, then restores it once you're done. You can adapt the code to your specific needs:
Expand|Select|Wrap|Line Numbers
  1. Public Sub ChangeDefaultPrinterThenRestore()
  2.   'substitute your Printer's DeviceName
  3.   Set Application.Printer = Application.Printers("HPLJ4050N")
  4.      DoCmd.OpenReport "rptCompanyPhoneList"
  5.  
  6.   'change the Default Printer back to what it was
  7.   Set Application.Printer = Nothing
  8. End Sub
Hope this points you in the right direction...
Jan 4 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.