PC Review


Reply
Thread Tools Rate Thread

Back-to-Back DoCmd.OpenReport fails if Printer Offline

 
 
Help with Multi Catalog
Guest
Posts: n/a
 
      21st Nov 2009
I have discovered that this fails:
private sub DoListAndReceipt()
DoCmd.OpenReport ...
DoCmd.OpenReport ...
end sub
when my Printer is Offline.

The first OpenReport executes and makes it to the Printer Queue.
The second OpenReport does not execute at all.
Execution falls-thru to the "end sub".
Cancelling the first report in the queue does no good.

I have traced, trapped, etc., but to no avail.
The printer offline aborts the second DoCmd.OpenReport.

The application is in Access 2003 with a 2000 mdb format.

Does anyone have a "solid" means of retrieving the Printer Offline status
-or-
How the second DoCmd.OpenReport can be executed, despite Printer Offline (at
least the Report will be in the queue)?
 
Reply With Quote
 
 
 
 
Marshall Barton
Guest
Posts: n/a
 
      21st Nov 2009
Help with Multi Catalog wrote:

>I have discovered that this fails:
> private sub DoListAndReceipt()
> DoCmd.OpenReport ...
> DoCmd.OpenReport ...
> end sub
>when my Printer is Offline.
>
>The first OpenReport executes and makes it to the Printer Queue.
>The second OpenReport does not execute at all.
>Execution falls-thru to the "end sub".
>Cancelling the first report in the queue does no good.
>
>I have traced, trapped, etc., but to no avail.
>The printer offline aborts the second DoCmd.OpenReport.
>
>The application is in Access 2003 with a 2000 mdb format.
>
>Does anyone have a "solid" means of retrieving the Printer Offline status
>-or-
>How the second DoCmd.OpenReport can be executed, despite Printer Offline (at
>least the Report will be in the queue)?



I know nothing about what may or may not happen when a
printer is "offline", but your example left out a very
important bit of information. If you are opening the same
report in both lines, e.g.

DoCmd.OpenReport "reportA", ...
DoCmd.OpenReport "reportA", ...

then that has always been unlikly to run as you might
expect. If the first one is still running when the the
second one executes (very likely), the second one will just
interfere with the first one, sometimes switching the where
condition in mid steam.

If you are opening two different reports, e.g.

DoCmd.OpenReport "reportA", ...
DoCmd.OpenReport "reportB", ...

Then I could only guess that the problem would be more
closely related to the print spooler than the printer's
status.

--
Marsh
MVP [MS Access]
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DoCmd.OpenReport suddenly failing, macro OpenReport succeeds MattE Microsoft Access 2 4th Sep 2007 01:16 PM
Offline Box is Back! =?Utf-8?B?RHJhZ29uZmx5Xzk2MQ==?= Windows XP Internet Explorer 0 31st Jan 2006 05:13 PM
why is my printer offline and I can't get back on online BJ monit =?Utf-8?B?TGlzYSBDb3Vsc29u?= Microsoft Word Document Management 2 4th Jun 2005 06:53 PM
Network printer offline and I can't get it back online Brian Smither Windows XP Print / Fax 0 16th May 2004 09:03 PM
Network printer offline and I can't get it back online Brian Smither Windows XP Print / Fax 0 25th Apr 2004 08:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:03 AM.