Track report runs

  • Thread starter Thread starter Sharsy
  • Start date Start date
S

Sharsy

how would I go about...
to count number of times a user runs a report for a given period of time

I would like to be able to track this for each user acount and report
metrics on it regularly
 
Sharsy said:
how would I go about...
to count number of times a user runs a report for a given period of time

I would like to be able to track this for each user acount and report
metrics on it regularly

You could try something along these lines.

Create a table -- ReportRuns
with fields
Id (autonumber)
ReportName
UserId
RunDateTime

If there's ony 1 report you won't need report name.

Supposing the user executes/runs the report via a button click, you could add code to the OnClick Event

Get the user name from Environ or from a list you already have.
Insert a record into the Table, providing the UserId and Now() as RunDateTime

The table will have an entry for every run of the report along with UserId and RunDateTime.

You can query this table as you please to review historical info.
You could delte records from the Table when you etermine they are no longer needed.

Good luck
 
how would I go about...
to count number of times a user runs a report for a given period of time

I would like to be able to track this for each user acount and report
metrics on it regularly

You'll need to create a log table with fields for the userID, the date/time,
and probably the name of the report; and put VBA code in (say) the report's
Open event to open this table and add a record. You will probably need to
implement Access workgroup security and ensure that each user logs on with a
distinct ID in order to do this.
 
To add some to John Vinson's answer, you can also grab the user's NTUserID in
lieu of implementing Access User Level Security (ULS) to grab the
CurrentUser(). Then have a field in the log table to track the NTUserID, date
& time (Now function), along with the name of the report.

Get Login name
http://www.mvps.org/access/api/api0008.htm


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 

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

Similar Threads


Back
Top