creat an audit record when a report is run

Stuart Green

Registered User.
Local time
Today, 19:33
Joined
Jun 24, 2002
Messages
108
I have a dbase with a number of fairly simple but time critical reports (need to be run weekly, monthly etc). What I would like to do is set up an audit table with 3 fields to record when a report was run, by whom and which report. As the various reports are run a record should be created in this audit table showing these details. I do not want the user to be particularly aware of this (not through secrecy, just trying to keep the screen simple). Any suggestions as to how I can combine a run report action with creating a new record in a table that isn't open please?
 
The problem you face is that without user intervention, there is no way of knowing that a report has actually printed. Otherwise you could use the on click event of a customised print menu to simply update your Audit table. An update query will do this for you.
 
Hi Rich. the problem with the update is that it only changes the one record. I want to create a new record in my audit table every time a button is pressed. I would like it to record the date using date(), who clicked the button using currentuser() and a text item such as "report has been run" in a text field. This way I will get a log of every time the report has been previewed
 
Must be my lack of knowledge of Access but how do I append in this way. The only way I have been able to use append is from one table to another. In this case I have a table called tbl_audit with a field called action and a field called date_actioned . I need the field action to by appended with a text mesage and the field date_actioned with the current date. I have tried all ways I know of using append to do this but the options just aren't there.
 
Add the table you want to update to the query, add the date and text field to the grid, in the update to of the date field put Date() in the update to text field put "whatever text you want".
HTH
 
Sorry I am being stupid here but...

In the append query, the only options I have are

Fields
Table
Sort
Append to
Criteria
or

The options you have quoted only appear in the update query for me. I want to append to the field [action] the text "report run".
 
Sorry Stuart, not thinking straight at the moment, this should help you
Article ID: Q154894
 
Thanks for all the great help once again! I will now plod through. As an old DataEase user I sometimes find Access so frustrating when you have to do such basic things. (DataEase has a cunningly named option, "enter a record in" that does this so easily) That's progress for you.
 

Users who are viewing this thread

Back
Top Bottom