A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

ActivePrinter Problem



 
 
Thread Tools Display Modes
  #1  
Old July 11th, 2006, 04:16 PM posted to microsoft.public.access.reports
Jack Cannon
external usenet poster
 
Posts: 151
Default ActivePrinter Problem

I need to determine and/or set the active printer
prior to printing a report in Access 2002.

The help files indicate that both of the following
simple examples should work.

Msgbox Application.ActivePrinter

Msgbox ActivePrinter

The first example returns a compile error
"Method or data member not found".

The second example will compile but returns a runtime
error 429, "ActiveX component can't create object".

Any suggestions would be appreciated.

Jack Cannon

  #2  
Old July 11th, 2006, 04:28 PM posted to microsoft.public.access.reports
Allen Browne
external usenet poster
 
Posts: 11,706
Default ActivePrinter Problem

Try:
Application.Printer.DeviceName

You can set that to one of the items in the Application.Printers()
collection.

For an example of code that does that, see:
Printer Selection Utility
at:
http://allenbrowne.com/AppPrintMgt.html

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

"Jack Cannon" wrote in message
...
I need to determine and/or set the active printer
prior to printing a report in Access 2002.

The help files indicate that both of the following
simple examples should work.

Msgbox Application.ActivePrinter

Msgbox ActivePrinter

The first example returns a compile error
"Method or data member not found".

The second example will compile but returns a runtime
error 429, "ActiveX component can't create object".

Any suggestions would be appreciated.

Jack Cannon



  #3  
Old July 11th, 2006, 05:58 PM posted to microsoft.public.access.reports
Jack Cannon
external usenet poster
 
Posts: 151
Default ActivePrinter Problem

Thanks Allen,

This works great and your utility will prove to be a better solution
for my client than what I was proposing.

Any idea why the usually accurate Help Files do not appear to
be working for my original example?

Jack Cannon

"Allen Browne" wrote:

Try:
Application.Printer.DeviceName

You can set that to one of the items in the Application.Printers()
collection.

For an example of code that does that, see:
Printer Selection Utility
at:
http://allenbrowne.com/AppPrintMgt.html

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

"Jack Cannon" wrote in message
...
I need to determine and/or set the active printer
prior to printing a report in Access 2002.

The help files indicate that both of the following
simple examples should work.

Msgbox Application.ActivePrinter

Msgbox ActivePrinter

The first example returns a compile error
"Method or data member not found".

The second example will compile but returns a runtime
error 429, "ActiveX component can't create object".

Any suggestions would be appreciated.

Jack Cannon




  #4  
Old July 12th, 2006, 02:44 AM posted to microsoft.public.access.reports
Allen Browne
external usenet poster
 
Posts: 11,706
Default ActivePrinter Problem

I never heard of the ActivePrinter object.
Just checked the Access 2003 help file, and it hasn't heard of it either.

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

"Jack Cannon" wrote in message
...
Thanks Allen,

This works great and your utility will prove to be a better solution
for my client than what I was proposing.

Any idea why the usually accurate Help Files do not appear to
be working for my original example?

Jack Cannon

"Allen Browne" wrote:

Try:
Application.Printer.DeviceName

You can set that to one of the items in the Application.Printers()
collection.

For an example of code that does that, see:
Printer Selection Utility
at:
http://allenbrowne.com/AppPrintMgt.html

"Jack Cannon" wrote in message
...
I need to determine and/or set the active printer
prior to printing a report in Access 2002.

The help files indicate that both of the following
simple examples should work.

Msgbox Application.ActivePrinter

Msgbox ActivePrinter

The first example returns a compile error
"Method or data member not found".

The second example will compile but returns a runtime
error 429, "ActiveX component can't create object".



  #5  
Old July 12th, 2006, 10:09 PM posted to microsoft.public.access.reports
Jack Cannon
external usenet poster
 
Posts: 151
Default ActivePrinter Problem

I'm using Access 2002 on one machine and Access 2000 on another. The
ActivePrinter object is described in both but doesn't seem to work in either.

You have been a great help and I truly appreciate it.

Jack Cannon

"Allen Browne" wrote:

I never heard of the ActivePrinter object.
Just checked the Access 2003 help file, and it hasn't heard of it either.

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

"Jack Cannon" wrote in message
...
Thanks Allen,

This works great and your utility will prove to be a better solution
for my client than what I was proposing.

Any idea why the usually accurate Help Files do not appear to
be working for my original example?

Jack Cannon

"Allen Browne" wrote:

Try:
Application.Printer.DeviceName

You can set that to one of the items in the Application.Printers()
collection.

For an example of code that does that, see:
Printer Selection Utility
at:
http://allenbrowne.com/AppPrintMgt.html

"Jack Cannon" wrote in message
...
I need to determine and/or set the active printer
prior to printing a report in Access 2002.

The help files indicate that both of the following
simple examples should work.

Msgbox Application.ActivePrinter

Msgbox ActivePrinter

The first example returns a compile error
"Method or data member not found".

The second example will compile but returns a runtime
error 429, "ActiveX component can't create object".




  #6  
Old July 23rd, 2008, 07:13 PM posted to microsoft.public.access.reports
JString
external usenet poster
 
Posts: 90
Default ActivePrinter Problem

Found it through MSDN:

http://support.microsoft.com/kb/162239/en-us

looks like it wasn't added to the Access libraries.

"Jack Cannon" wrote:

I'm using Access 2002 on one machine and Access 2000 on another. The
ActivePrinter object is described in both but doesn't seem to work in either.

You have been a great help and I truly appreciate it.

Jack Cannon

"Allen Browne" wrote:

I never heard of the ActivePrinter object.
Just checked the Access 2003 help file, and it hasn't heard of it either.

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

"Jack Cannon" wrote in message
...
Thanks Allen,

This works great and your utility will prove to be a better solution
for my client than what I was proposing.

Any idea why the usually accurate Help Files do not appear to
be working for my original example?

Jack Cannon

"Allen Browne" wrote:

Try:
Application.Printer.DeviceName

You can set that to one of the items in the Application.Printers()
collection.

For an example of code that does that, see:
Printer Selection Utility
at:
http://allenbrowne.com/AppPrintMgt.html

"Jack Cannon" wrote in message
...
I need to determine and/or set the active printer
prior to printing a report in Access 2002.

The help files indicate that both of the following
simple examples should work.

Msgbox Application.ActivePrinter

Msgbox ActivePrinter

The first example returns a compile error
"Method or data member not found".

The second example will compile but returns a runtime
error 429, "ActiveX component can't create object".




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:58 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.