Flagging Printed Records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database with a table full of records I wish to report. I have it
set up so that a single-page report will print--one for each of the records
in the table. How would I go about having the record flagged in the table
once it has been printed so that I will not print it again?
 
Here are some ideas:

1-In your table add a Yes/No field and call it Printed, set the default to
No, and a field for Date_Printed with no default value
2-Update all your records with No in the Field Printed
3-The record source of your report should filter only the Printed field when
is False
4-Create a query that updates the Printed Field to Yes and the Date_Printed
to date(), make sure this query has the same criteria as the one used in your
report
5-Create a macro (Confirm_Print_mcr) that:
-set the warnings off
-runs the query in step 4
6-In the report create an Event Procedure for the Report's On Close Event
(view\properties-Event tab)
7-Add this code to the event

If MsgBox("All records Printed correctly?", vbOKCancel) = vbOK Then
DoCmd.RunMacro "Confirm_Print_mcr"
End If

8-Somehow you have to trust the user to click when the records are really
printed, if they click OK by mistake at least you know what date the records
were marked an you can reverse the action for that day
 
Back
Top