473,320 Members | 1,846 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,320 software developers and data experts.

Change Printer

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
Sep 29 '07 #1
8 2857
Phil Stanton wrote:
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
Newer versions of access have a printer object. For you, you can check
out Albert Kallal's excellent example.
See http://www.members.shaw.ca/AlbertKal.../msaccess.html
Sep 29 '07 #2
If all you have is an MDE file, there's nothing you can do in VBA, you have
no access to the code.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200709/1

Sep 29 '07 #3
Linq Adams via AccessMonster.com wrote:
If all you have is an MDE file, there's nothing you can do in VBA,
you have no access to the code.

I don't think the OP is trying to modify an MDE's code. He's just acknowledging
that some things are not doable in code when what you intend to distribute is an
MDE.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Sep 29 '07 #4
Spot on Rick.

I obviously develop an MDB, but there is less chance of the operators
cocking things up if it is distributed as an MDE

Phil
"Rick Brandt" <ri*********@hotmail.comwrote in message
news:Tz******************@newssvr13.news.prodigy.n et...
Linq Adams via AccessMonster.com wrote:
>If all you have is an MDE file, there's nothing you can do in VBA,
you have no access to the code.


I don't think the OP is trying to modify an MDE's code. He's just
acknowledging that some things are not doable in code when what you intend
to distribute is an MDE.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Sep 30 '07 #5
Thanks for coming back, but I am still stuck.

Albert's routine changes the default printer from the Epson to the PDF
Printer perfectly, but the report still "remembers" what printer it was
created for and stubornly refuses to change to the new default printer.

Cant use the PRTDev even if I could find out how to use it as I understand
you can only set it when in design view, and I want to distribule the
database as an MDE rather than an MDB

Thanks for any thought

Phil

"Salad" <oi*@vinegar.comwrote in message
news:13*************@corp.supernews.com...
Phil Stanton wrote:
>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

Newer versions of access have a printer object. For you, you can check
out Albert Kallal's excellent example.
See http://www.members.shaw.ca/AlbertKal.../msaccess.html

Sep 30 '07 #6
Phil Stanton wrote:
Thanks for coming back, but I am still stuck.

Albert's routine changes the default printer from the Epson to the PDF
Printer perfectly, but the report still "remembers" what printer it was
created for and stubornly refuses to change to the new default printer.
I don't understand. Is the report set to a "specific" printer or a
"default" printer in design mode? Since Albert's function sets the
default printer, I think all one would need to do is print the report
and on close of the report set the printer back to the default. Now if
you had set the report to print to a specific printer then I can
understand your dilemma.

Cant use the PRTDev even if I could find out how to use it as I understand
you can only set it when in design view, and I want to distribule the
database as an MDE rather than an MDB

Thanks for any thought

Phil

"Salad" <oi*@vinegar.comwrote in message
news:13*************@corp.supernews.com...
>>Phil Stanton wrote:
>>>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

Newer versions of access have a printer object. For you, you can check
out Albert Kallal's excellent example.
See http://www.members.shaw.ca/AlbertKal.../msaccess.html


Sep 30 '07 #7
Thanks, Salad.

Spot on. Set to specific printer. Now works a treat after changing to
default. Will have to check the rest of the reports

Thanks a lot

Phil
"Salad" <oi*@vinegar.comwrote in message
news:13*************@corp.supernews.com...
Phil Stanton wrote:
>Thanks for coming back, but I am still stuck.

Albert's routine changes the default printer from the Epson to the PDF
Printer perfectly, but the report still "remembers" what printer it was
created for and stubornly refuses to change to the new default printer.

I don't understand. Is the report set to a "specific" printer or a
"default" printer in design mode? Since Albert's function sets the
default printer, I think all one would need to do is print the report and
on close of the report set the printer back to the default. Now if you
had set the report to print to a specific printer then I can understand
your dilemma.

>Cant use the PRTDev even if I could find out how to use it as I
understand you can only set it when in design view, and I want to
distribule the database as an MDE rather than an MDB

Thanks for any thought

Phil

"Salad" <oi*@vinegar.comwrote in message
news:13*************@corp.supernews.com...
>>>Phil Stanton wrote:

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

Newer versions of access have a printer object. For you, you can check
out Albert Kallal's excellent example.
See http://www.members.shaw.ca/AlbertKal.../msaccess.html

Sep 30 '07 #8
Phil Stanton wrote:
Thanks, Salad.

Spot on. Set to specific printer. Now works a treat after changing to
default. Will have to check the rest of the reports

Thanks a lot
You're welcome. Albert provided a good solution for those using older
Access versions; simple and easy to use.
>
Phil
"Salad" <oi*@vinegar.comwrote in message
news:13*************@corp.supernews.com...
>>Phil Stanton wrote:

>>>Thanks for coming back, but I am still stuck.

Albert's routine changes the default printer from the Epson to the PDF
Printer perfectly, but the report still "remembers" what printer it was
created for and stubornly refuses to change to the new default printer.

I don't understand. Is the report set to a "specific" printer or a
"default" printer in design mode? Since Albert's function sets the
default printer, I think all one would need to do is print the report and
on close of the report set the printer back to the default. Now if you
had set the report to print to a specific printer then I can understand
your dilemma.
>>>Cant use the PRTDev even if I could find out how to use it as I
understand you can only set it when in design view, and I want to
distribule the database as an MDE rather than an MDB

Thanks for any thought

Phil

"Salad" <oi*@vinegar.comwrote in message
news:13*************@corp.supernews.com...
Phil Stanton wrote:
>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

Newer versions of access have a printer object. For you, you can check
out Albert Kallal's excellent example.
See http://www.members.shaw.ca/AlbertKal.../msaccess.html

Oct 2 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: kchengso | last post by:
One of my printers in my printer.devicename call returns in lower case. Is it possible for me to change it to upper case? I am also wondering how, in the first place, this particular printer...
4
by: Nothing | last post by:
I have a form that I send to a printer. The workstation that is using the DB has more then one printer defined. The default is NOT the printer that I want to use for output from the report/form. ...
5
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...
0
by: mfarouk | last post by:
Hi All, I need to change the port of the priner in my program. as the printer may be attached to another port. It is an USB printer. I tried to use GetPrinter & SetPrinter APIs with structure...
2
by: Pablo | last post by:
Friends, I need to change the default printer from code, with no user iterativity. Any sample code? suggestion? C#,VB, nevermind!. Thanks Pablo
1
by: goJoe | last post by:
Hello! i amn trying to add a Visuail basic 6 code to an excisting code that has the purpose to change the current default printer to another printer by name and then after the printer to change...
1
by: ThunderMusic | last post by:
hi, Is there an easy way to change the default printer from .net? thanks ThunderMusic
1
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...
7
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.