Print Log

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chesne

    #1

    Print Log

    I have been experimenting with a Print Log which runs from the
    ReportHeader. However, I would like to be able to print a report to a
    number of receipents based on one report.

    The print log as issued by MS works but does not log each receipent,
    only the one report. Is there a way to do this.

    The code is as follows from MS

    Option Compare Database
    Option Explicit

    Private Sub Report_Activate ()
    Flag = 0
    End Sub


    Private Sub Report_Deactiva te()
    Flag = -1
    End Sub

    Private Sub ReportHeader_Pr int(Cancel As Integer, PrintCount As
    Integer)
    Dim dbs As Database, rst As Recordset
    Set dbs = CurrentDb()
    Set rst = dbs.OpenRecords et("tblPrintedR eports")
    Dim Msg As String
    Flag = Flag + 1

    ' If the current value of Flag = 1, then a hard copy of the
    ' report is printing, so add a new record to the history table.

    If Flag = 2 Then

    rst.AddNew
    rst!ReportName = Me.Name 'I added this instead of a fixed name
    rst!PrintDate = Now
    rst.Update

Working...