Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

Setting a Default Printer inside Access form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hansford cornett - 13 Jul 2007 15:04 GMT
I have a login form/table that detects who the user is that is logged into
one of my projects.  I have added variables [PrjADefaultPrinter] and
[NormalPrinter] to my table with the PrjADefaultPrinter = A_IPADDRESS and
NormalPrinter = B_IPADDRESS.  

My goal is to set the default printer upon logging in to A_IPADDRESS and to
B_IPADDRESS when the user clicks the exit button to leave the application.

Any help you can offer would be greatly appreciate.

Dwight


Signature

Hansford D. Cornett

Allen Browne - 13 Jul 2007 15:59 GMT
What version of Access is this?

If 2002 or later, you can set the printer like this:
   Set Application.Printer = Application.Printers(0)
or if you prefer:
   Set Application.Printer = Application.Printers("Microsoft Office
Document Image Writer")

Then to reset it to the default Windows printer again:
   Set Application.Printer = Nothing

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I have a login form/table that detects who the user is that is logged into
> one of my projects.  I have added variables [PrjADefaultPrinter] and
[quoted text clipped - 8 lines]
>
> Dwight
Hansford cornett - 13 Jul 2007 16:12 GMT
Thanks thanks and thanks will give that a shot after I eat lunch....

HAVE A GREAT DAY and THANKS AGAIN!
Signature

Hansford D. Cornett

> What version of Access is this?
>
[quoted text clipped - 19 lines]
> >
> > Dwight
TonyT - 13 Jul 2007 16:54 GMT
And if you are still using 2000?

> What version of Access is this?
>
[quoted text clipped - 19 lines]
> >
> > Dwight
Allen Browne - 14 Jul 2007 04:23 GMT
Albert Kallal has a downloadable example for switching printers with earlier
versions. For Access 2000:
   http://www.members.shaw.ca/AlbertKallal/msaccess/printch2k.zip
of for Access 97:
   http://www.members.shaw.ca/AlbertKallal/msaccess/printch97.zip

It was also possible (though messy) to use PrtMip. Details:
   http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccessdev/h
tml/ODC_MicrosoftOfficeDeveloperForumControllingYourPrinterinMicrosoftAccess.asp


Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> And if you are still using 2000?
>
[quoted text clipped - 25 lines]
>> >
>> > Dwight
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.