473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Default printer in Access

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
1 1959
ADezii
8,834 Expert 8TB
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

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

Similar topics

0
by: Esmee | last post by:
Hi there, I have created an Access 2002 db which contains several reports. Some reports need to be printed on a Laserjet and others on a Labelprinter. One of my clients wants to be able to print...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
3
by: sakuragirl1 | last post by:
I have vb code that gives a user the option to select the printer for printing a report. At the end I change the default printer back to what it was. Unfortunately the code I found is for win9x so...
2
by: MLH | last post by:
I would like to allow users to set, as an application default, a specific printer to send reports to. I don't know how to bring up a list of valid print devices in A97, nor do I know how to...
1
by: Ravikanth[MVP] | last post by:
Hello, You can use the PrintDocument component to use the default printer. If you don't specify a printer to the PrintDocument object, by default, it will use the default printer. This is a...
1
by: i8mypnuts | last post by:
Could someone please help? I am using the 'defaultprt.zip' tool provided by Ken Getz to change the default printer via VBA code (code below). My problem is that once the default printer has been...
1
by: groulder | last post by:
hi all, i have a problem with a network database that's used by a lot of people. people are finding, they will start the database, and if the mouse is moved over the print icon, the tooltip...
6
by: Ian | last post by:
I am trying to get MS Access 2000 to print names and addresses onto a Dymo 400 label printer, I have set the Access Report to automatically select the correct printer, then select the label size of...
3
by: brianflannery | last post by:
Greetings all! My problem is this. I've installed a new printer on my computer. This is the "default printer" for access. Now, some of my reports, which were working fine with the old printer,...
8
by: ncsthbell | last post by:
Is there a way to change my default printer using vb? I have some reports I want to print to a certain printer and some to a different one. I have a routine that loops through all of the reports to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.