Setting a Default Printer inside Access form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
Thanks thanks and thanks will give that a shot after I eat lunch....

HAVE A GREAT DAY and THANKS AGAIN!
--
Hansford D. Cornett


Allen Browne said:
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

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
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
 
And if you are still using 2000?



Allen Browne said:
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

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
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
 
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/d...umControllingYourPrinterinMicrosoftAccess.asp

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

TonyT said:
And if you are still using 2000?

Allen Browne said:
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

message
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
 
Back
Top