[AccessD] When is a report actually printed (vs previewed only)

MartyConnelly martyconnelly at shaw.ca
Mon Oct 6 22:56:05 CDT 2003


Here is some vb 6 code to monitor the print queue
with some caveats
 Microsoft print reports like word documents, may not give you correct 
no of pages.
 It only monitors the print drivers unless the print driver for that 
specific printer continuously polls the machine. You wont get info about 
paper jams or low toner. Very few low end and medium printers
do.
http://www.merrioncomputing.com/Programming/index.htm
there is a mail list at
http://groups.yahoo.com/group/MerrionComputing/


Stuart McLachlan wrote:

>On 7 Oct 2003 at 9:30, David Fenton wrote:
>
>  
>
>>Hello again, I have searched archives and looked through recent
>>newsgroups for Access Reports and found only a few tips on determining
>>if a report is printed rather than just previewed. None of them seem
>>to hit the mark I'm after. 
>>
>>Does anyone have any u-beaut ideas on how I can tell whether a report
>>has been previewed or printed? I do not want to prevent my users from
>>printing. In the OnClose event of the report I set a 'printed' flag.
>>But one of my users correctly pointed out that previewing it is not
>>the same as printing it. She can look at the report but change her
>>mind and NOT print it. In that case she doesn't want the 'printed'
>>flag to be set. I guess she's after a Cancel button on the print
>>preview. I am not aware of any cancel methods on the print preview
>>page. I know there is an OnPrint event, but it seems to apply to
>>sections of the report, not the entire report itself. 
>>
>>    
>>
>The on_print event fires when the report is displayed on screen as well. 
>As far as Access is concerned printing to the screen or saving the report 
>to a file is the same as printing to a printer.
>
>  
>
>>I could have two buttons on the form - one preview and one print, then
>>putting the flag setting into OnClick on the print button instead of
>>the report itself, but it doesn't feel robust... Any ideas folks? Cheers
>>David Ô¿Ô¬ Brisbane Australia 
>>
>>    
>>
>The trouble with that option is that the user can still print  from the 
>preview in which case the flag won't be set.
>
>The other problem with any method of setting a flag programmatically is , 
>what happens when the printer is not available/ has a paper jam/ runs out 
>of paper etc. Although some printer drivers with two way communication 
>can tell you some of these things, in many cases there is *no* way within 
>Access to be sure that the report was in fact printed.
> 
>
>
>
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada





More information about the AccessD mailing list