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

Change Printer

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.