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

Printing with mobile db

P: n/a
I have a db running on a notebook computer that I carry between my
office and home. I was wondering if anyone had experience in setting
the default printer by selecting from a list when the db is opened.
Example. Open the database in my office and select printer # 1 as the
default. Open the database at home and select the printer # 2 as the
default. Open the db on the road and select the printer #3 as the
default. I know I could probably just open the printers folder and
select the default but thought I'd throw the question out there.
Thanks in advance!
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
br************@ci.verona.wi.us (Brian) wrote in message news:<21**************************@posting.google. com>...
I have a db running on a notebook computer that I carry between my
office and home. I was wondering if anyone had experience in setting
the default printer by selecting from a list when the db is opened.
Example. Open the database in my office and select printer # 1 as the
default. Open the database at home and select the printer # 2 as the
default. Open the db on the road and select the printer #3 as the
default. I know I could probably just open the printers folder and
select the default but thought I'd throw the question out there.
Thanks in advance!


Vol 1 of the Access 2000 Developer's Handbook by Ken Getz, Paul Litwin
and Mike Gilbert describes how to change the default printer in
chapter 10. Import the Device and Devices modules into your
application. Call the ShowCurrentPrinter() function to determine the
name of your printers and SetDefaultPrinter() to change it. I have
used the functions to store the user's default printer, print a report
to the nearest printer loaded with letterhead paper and then set the
default back to the user's original default printer. It works great
even with the Access runtime and a secured MDE.
Nov 12 '05 #2

P: n/a
br************@ci.verona.wi.us (Brian) wrote in message news:<21**************************@posting.google. com>...
I have a db running on a notebook computer that I carry between my
office and home. I was wondering if anyone had experience in setting
the default printer by selecting from a list when the db is opened.
Example. Open the database in my office and select printer # 1 as the
default. Open the database at home and select the printer # 2 as the
default. Open the db on the road and select the printer #3 as the
default. I know I could probably just open the printers folder and
select the default but thought I'd throw the question out there.
Thanks in advance!


There's code all over the place for switching printers in code...
Albert Kallal's website, Developer's Handbook... etc...

Umm.. I guess all you really need is to determine programmatically if
you are connected to the network... how you do that is up to you.
then if your function fOnTheLAN returns False, then you could switch
to HomePrinter, otherwise, use WorkPrinter. (just grab the code from
Albert or Ken Getz's book...

but then again, what the heck do I know...
Nov 12 '05 #3

P: n/a
pi********@hotmail.com (Pieter Linden) wrote in message news:<bf**************************@posting.google. com>...
br************@ci.verona.wi.us (Brian) wrote in message news:<21**************************@posting.google. com>...
I have a db running on a notebook computer that I carry between my
office and home. I was wondering if anyone had experience in setting
the default printer by selecting from a list when the db is opened.
Example. Open the database in my office and select printer # 1 as the
default. Open the database at home and select the printer # 2 as the
default. Open the db on the road and select the printer #3 as the
default. I know I could probably just open the printers folder and
select the default but thought I'd throw the question out there.
Thanks in advance!


There's code all over the place for switching printers in code...
Albert Kallal's website, Developer's Handbook... etc...

Umm.. I guess all you really need is to determine programmatically if
you are connected to the network... how you do that is up to you.
then if your function fOnTheLAN returns False, then you could switch
to HomePrinter, otherwise, use WorkPrinter. (just grab the code from
Albert or Ken Getz's book...

but then again, what the heck do I know...


Ok....I have solved one half of the problem. I now have a pop up form
that allows me to select the default printer when the database opens.
HOWEVER, from what I'm gathering, access "stores" printer information
for reports when they are viewed in "print preview". Example. Report
#1 is designed and saved to print to "default printer". Report #1 is
opened in "print preview". The report is then printed via
"file/print...and a printer OTHER THAN the default printer is chosen.
That printer is now magically set up to print to "other than" the
default printer. AAARRRGGGHHHHH! Suggestions, please?????
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.