Here is a response I found from an old posting by FredG.
You can use the following code to determine if the report has been sent to the
printer, whether or not it has also been previewed.
HOWEVER... Even if it has been sent to the printer, there is no way to tell if
the printout has been successfully printed until you have the paper report in
your hand.
The actual starting value of intPreview below depends upon if you have a
control in the report to compute [pages].
Comment out the un-needed portion of the code accordingly.
Option Compare Database
Option Explicit
Dim intPreview As Integer
Private Sub Report_Activate()
intPreview = -1 ' If [Pages] is not used
' intPreview = -2 ' If [Pages] used
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 "Gone Printing"
' You can place code here to update a table field to show it was
sent to printer
End If
intPreview = intPreview + 1
End Sub
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Thanks Tom,
I believe we are on the same page.
My client needs to know when a user invokes a print, not necessarily whether
it was successful or not.
I was hoping for a Windows API/ystem solution - still looking,
cheers,