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 3417 FishVal 2,653
Recognized Expert Specialist
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 "ActivePrin ter property" topic in Access help.
Hi.
See "ActivePrin ter property" topic in Access help.
I couldn't find any "ActivePrin ter" 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?
FishVal 2,653
Recognized Expert Specialist
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.n z, has kindly provided sample code for easily switching printers on the fly while printing Access reports, with code as simple as this...
SaveDefaultPrin ter
DefaultPrinter = "HP Laserjet (A3)"
DoCmd.OpenRepor t "rptTest", acViewNormal
RestoreDefaultP rinter
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.n z, has kindly provided sample code for easily switching printers on the fly while printing Access reports, with code as simple as this...
SaveDefaultPrin ter
DefaultPrinter = "HP Laserjet (A3)"
DoCmd.OpenRepor t "rptTest", acViewNormal
RestoreDefaultP rinter
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 is a
separate issue, which pdf995 does not addresses).
I downloaded pdf995. It controls printing via pdf995.ini file. In the
VBA code, I have DoCmd.OpenReport "Report2", acViewNormal. I am having
the following problems right now.
(a) I do...
|
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 active.
Do I access the windows messaging system or...?
Anybody got a clue?
|
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 the printer destination for special reports such as
stickers and mailing labels. The Mailing Label report is, of course,
designed here for a specific printer (Mailing Label). At another site,
the name could be completely different. Other than...
|
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 know how will this affect a report rendered by a crystal
viewer.
I have a web page with a crystal viewer rendering the report on the
page.
I build my application in one of my development machines and deploy it
|
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 has a local printer, the
report is prints locally. What I'm I doing wrong! The complete
subroutine follows:
Private Sub PrintReport(strReportName As String)
On Error GoTo PrintReport_Err
| |
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 printer's physical margins using VB coding?
Cheers
--
Osmotion Blue
|
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 printer from the default printer
for that report to a PDF995 printer (so that i can print it to a file for
subsequent emailing) then back to the default Epsom 830 printer?
Thanks for any help
Phil
|
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 “99012 Large
Address”.
This works fine but when I move my database to another PC (with
identical Dymo printer and drivers) the report defaults to the correct
printer but does not select the label “99012 Large Address”. On
different PC’s it...
|
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 in which
another printer is installed (its HP) NOW, in many reports
when we run data reprot its give errror
"report widht is larger than papper widht"
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |