Logging when a report has been printed

BarryMK

4 strings are enough
Local time
Today, 09:52
Joined
Oct 15, 2002
Messages
1,350
Good morning all
Access 97 - I have a Form with three command buttons, each of which previews a different report, which if correct is subsequently printed. Is it possible to log in the underlying table record which report has been printed? I could change the command buttons to print rather than preview if it would simplify matters.
 
If you plan on tracking when all reports are printed and how many times, I suggest creating a seperate table to do so. You can place the name of the report, the date is was printed and even who printed it into this table.

Paul
 
I suggest you create two additional fields in the underlying table; one of them would be 'ReportPrinted" and the other one "DatePrinted".

Create an update query to mark those two field with the name of the report printed and the date it was printed accordingly.

On closing your report (onclose or onunload property), run the query.

Code as follows:

Docmd.setwarnings false
Docmd.openquery "yourqueryname"
Docmd.setwarnings true

The above code will run your query and update the two fields mentioned above.


edtab
 
Thanks Edtab

Your code runs the query fine, so far so good. The update query, however, is updating every row in the table where I need it only to update the individual record underlying the report. In a relational dbase I could add a where statement based on ID keys to select the row but this is a flat database with only one table needed – any ideas how I can isolate the row for the update?
 
I used my own brain and worked out an update query related to the report query which limits the selection to the row in question. Thanks to both respondees.
 

Users who are viewing this thread

Back
Top Bottom