Hi All,
I have an Access97 frontend on a SQL Server 2005 back end database. Reading your forums, I discovered how to generate a dropdown list of available printers. I can also store the user's choice from the listbox in a front-end table. Now I need to know: Do you have any code that I can use to assign the printer to the report in the on_open event of the report? FYI, I'm trying to allow workstation users to define 2 default printers, 1 for sheet reports and another for labels. Any help would be much appreciated.
6 3392
Hi All,
I have an Access97 frontend on a SQL Server 2005 back end database. Reading your forums, I discovered how to generate a dropdown list of available printers. I can also store the user's choice from the listbox in a front-end table. Now I need to know: Do you have any code that I can use to assign the printer to the report in the on_open event of the report? FYI, I'm trying to allow workstation users to define 2 default printers, 1 for sheet reports and another for labels. Any help would be much appreciated.
Hi.
See "ActivePrinter property" topic in Access help.
Hi.
See "ActivePrinter property" topic in Access help.
I couldn't find any "ActivePrinter" in Access97 help or in the VBA object browser. Where should I look next?
I need to select a printer in a list box, and then print reports to that printer until the selection is changed. Any ideas? Please?
I need to select a printer in a list box, and then print reports to that printer until the selection is changed. Any ideas? Please?
Sorry, I've never dealt with A97. I will ask the community to help you.
Sorry, I've never dealt with A97. I will ask the community to help you.
See this tip from www.aadconsulting.com
Tip and Code Sample: Switching Printers from within your MS Access Application
Fellow Access develepor, Mark Plumpton, of customdata.co.nz, has kindly provided sample code for easily switching printers on the fly while printing Access reports, with code as simple as this...
SaveDefaultPrinter
DefaultPrinter = "HP Laserjet (A3)"
DoCmd.OpenReport "rptTest", acViewNormal
RestoreDefaultPrinter
Download these demo Access97/2000 databases, which include a class module that performs the function of listing and switching default printers. http://www.aadconsulting.com/printers.zip
The code is also an excellent example of how you can use classes in your MS Access applications.
See this tip from www.aadconsulting.com
Tip and Code Sample: Switching Printers from within your MS Access Application
Fellow Access develepor, Mark Plumpton, of customdata.co.nz, has kindly provided sample code for easily switching printers on the fly while printing Access reports, with code as simple as this...
SaveDefaultPrinter
DefaultPrinter = "HP Laserjet (A3)"
DoCmd.OpenReport "rptTest", acViewNormal
RestoreDefaultPrinter
Download these demo Access97/2000 databases, which include a class module that performs the function of listing and switching default printers. http://www.aadconsulting.com/printers.zip
The code is also an excellent example of how you can use classes in your MS Access applications.
Hi and thanks PuppyDogBuddy,
I haven't tried it yet, but this looks like exactly the kind of information that I was looking for. Thanks again.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: gudia |
last post by:
I want to Programatically generate Access reports in the pdf format
using some tool and then email them to people in the same code. Right
now I am trying to do this with pdf995 using VBA (emailing...
|
by: Geir Baardsen |
last post by:
Hi!
Is there any way to check if printer is active in access 2000?
I have a report that is printing (local printer), and before I do
anything more in code, I do want to check if printer is...
|
by: Hank |
last post by:
My Access 2000 code has been running for several years in our main
plant. Now we need to install it, as a stand-along application, at
remote sites, some of which are out of state.
My problem is...
|
by: Karthic |
last post by:
When i right click on the .rpt file in the VS 2003, i see a property
printer setting.
It says "No printer" on the top and there is option to select printer
and paper settings etc..
I want to...
|
by: PCB |
last post by:
Hi all!
I have a subroutine that prints reports on a specific printer. The code
works fine as long as all the printers available to the computer are on
the network. However, if the computer also...
|
by: Mark |
last post by:
Hi,
I am creating application in VB 2005. and when I print report it adds extra
0.45 cm margin on left and top, and the reason for this is physical margins
of printer.
Is it possible to change...
|
by: Phil Stanton |
last post by:
Using Access 2000 (Yes I know there is no Printer specified) and an MDE File
(Yes I know I can't open a report in design view). Is there any way using
VBA of temporarily changing the report's...
|
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...
|
by: muddasirmunir |
last post by:
i am using vb6
i am facing one problem is datareport that
in my computer i had instaled a panasonic printer and the
data report show fine
but when i take my project to my office computer...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |