On Fri, 29 Feb 2008 11:13:19 -0800 (PST),
pr*************@gmail.com
wrote:
On Feb 29, 11:05 pm, fredg <fgutk...@example.invalidwrote:
>On Fri, 29 Feb 2008 10:53:48 -0800 (PST), prakashwadhw...@gmail.com
wrote:
>>While making Vouchers in a form, I have a POST button which validates
& posts the transaction to the main Accounts File.
>>I also have a PRINT button which provides the user with a preview of
the "to be printed" Voucher & then prints it onto paper.
>>When the user clicks PRINT ... my code validates the voucher & prints
it. Now I have to POST the transaction ... but how do I know if the
voucher has printed correctly ? i.e. no paper jam or some such other
problem.
>>Rgds,
Prakash
There is only one sure fire method, and that is to walk over to the
printer, pick up the piece of paper, and look.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Thx Fred !! But what if after previewing the Report, the user clicks
the close button on the Access Toolbar or presses Ctrl-W to close the
preview window & DOES NOT print a hardcopy ?
Is there any way for me to trap this ?
Rgds,
Prakash.
So now you just wish to know if the report was SENT to the printer?
The value of intPreview you use is determined whether you have a
control in the report calculating [Pages].
Option Compare Database
Option Explicit
Dim intPreview As Integer
Private Sub Report_Activate()
intPreview = -1 ' Pages Not used
' intPreview = -2 ' Pages
End Sub
___________
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
If intPreview >= 0 Then ' If [Pages] not used
' If intPreview >= 1 Then ' If [Pages] used
MsgBox "Sent to the Printer"
Else
MsgBox "Not sent to the Printer"
End If
intPreview = intPreview + 1
End Sub
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail