Re: Store Actual Print Report Date

From: Nick (cte_at_bigpond.net.au)
Date: 02/19/04


Date: Thu, 19 Feb 2022 11:42:14 +1100

  Interesting results ...

  If I use a command button on a form to preview the report first then print
from the preview screen, Access registers print preview in both instances.
However, if I use the command button to print directly, then the print event
is registered.

  Thank you, Alex

  "Alex Dybenko" <alex@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message
news:ekk7pxk9DHA.2392@TK2MSFTNGP11.phx.gbl...
> this is report's class module:
>
> Option Compare Database
> Option Explicit
> Private fPreview As Boolean
> Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
> End Sub
>
> Private Sub PageHeader_Print(Cancel As Integer, PrintCount As Integer)
> If fPreview Then
> Debug.Print "Preview"
> Else
> Debug.Print "Print"
> fPreview = False
> End If
> End Sub
>
> Private Sub Report_Activate()
> fPreview = True
> End Sub
>
> so, if you what to log print envent - replace Debug.Print "Print" with
your
> code which writes to your table
>
> --
> Alex Dybenko (MVP)
> http://Alex.Dybenko.com
>
>
>
> "Nick" <cte@bigpond.net.au> wrote in message
> news:uzbCuib9DHA.2756@TK2MSFTNGP10.phx.gbl...
> > I can see what you're getting at but the coding is a little too
brief
> for
> > my level of understanding. Would you mind filling it out more?
> >
> > Thanks
> > Nick
> >
> > "Alex Dybenko" <alex@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message
> > news:%23n$O2OW9DHA.2480@TK2MSFTNGP12.phx.gbl...
> > > you can catch Activate and Print events
> > > if:
> > > activate
> > > print
> > > - was preview
> > >
> > > if:
> > > print
> > > - was print
> > >
> > >
> > > HTH
> > > --
> > > Alex Dybenko (MVP)
> > > http://Alex.Dybenko.com
> > >
> > >
> > > "Nick" <cte@bigpond.net.au> wrote in message
> > > news:%23Zej4HN9DHA.1804@TK2MSFTNGP12.phx.gbl...
> > > > I want to have Access store the actual date a report was
printed.
> The
> > On
> > > > Format and On Print events are no help because each time the
report
> is
> > > > previewed the the date is different. So what I need is, when the
> piece
> > of
> > > > paper actually spits out of the printer, I want to record that
exact
> > date
> > > > and time in a table. With this, all users in the office who use
the
> > > database
> > > > can see when, and for that matter, if a report is now a hard
copy.
> > > >
> > > > There are several people in the office printing off reports.
They
> > don't to
> > > > be printing multiple copies if someone else has already it. By
> having
> > the
> > > > actual print date in the database, anyone will know if another
user
> > has
> > > > already produced the report.
> > > >
> > > > Thanks
> > > > Nick
> > > >
> > > >
> > >
> > >
> >
> >
>
>