Mark / Flag / Tag Printed Records

P

pinkpanther

I'm sure this has been asked and answered, but I could not find any
posts so;
I would like to mark records that have actually been printed. I have
a Printed Yes/No field in my table. How can I programmatically mark
this field when a record gets printed?

Background: I am working on a calibration change log that will have
many records, but I need to keep a hard copy (for now). This hard
copy is already 20 or 30 pages long. When I print new log entries, I
do not want to print every page again. Others (I hope) will be using
this log so I don't want them to have to go back and figure out what
pages do not need to be printed (the hard copy log will be in a remote
location with the machine). I want to query on the records not
printed to build my print job.

TIA,
Larry
 
J

Jerry Whittle

You could base the report on a query where Printed = No.

Then you could do an update query setting Printed = Yes for all the records.
It won't hurt to update Yes'es to Yes except for maybe slowing things down
for a few seconds if you have hunderds of thousands of records.

Both of these queries could be run off a command button on a form one after
another.

BUT (big but) what if the printer malfuctions? Maybe you should check the
printout first before updating the printed field. BUT (another one) what if
someone adds another record between the time that you did the print job and
then did the update of the Printed field? If either of these scenarios are a
worry, I'd make the Printed field a date/time data type and update it with
Now(). That way you could always go back and find the records that may have
not been printed correctly, for example if the printer jammed. Then your
query would be where Printed = Null. The Update query would be something like
Set Printed = Now() Where Printed = Null.
 
A

Armen Stein

BUT (another one) what if
someone adds another record between the time that you did the print job and
then did the update of the Printed field? If either of these scenarios are a
worry, I'd make the Printed field a date/time data type and update it with
Now(). That way you could always go back and find the records that may have
not been printed correctly, for example if the printer jammed. Then your
query would be where Printed = Null. The Update query would be something like
Set Printed = Now() Where Printed = Null.

Yes. If you update all the records in the same query, they will all
be updated with exactly the same Now() value. Then you could offer a
Reprint option, where the unique PrintDateTime values (and for extra
style points, the record counts) are listed in a combobox.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top