Hit counter

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

Guest

All,

I have several databases (2000 and XP Client O/S is
2000) on shared server (Novel). I have distributed Excel
files to a bunch of users that are updating their files
from these databases (accounting type stuff).

Does anyone have the code that will allow me to record
in the database everytime someone refreshes one of their
Excel, a hit if you will. At this point I don't need to
trap there Id or anything just a table that will have a
Hit counter and maybe the time of the Hit..

Thanks for all your help,
Tom Olsen
 
Hello Tom,
I'm a very humble Access user and not an expert, but I use
something that tracks the date and time a user logs into
my secure databases. It's a sign in form that logs into a
table the date and time an individual logged in. It does
not count though. It's borrowed from another site and has
done the job well. Besides tracking it also logs them in
at different security levels. Since you mentioned Excel,
this may not be what you need. The users can only log
into the switchboard and forms, but quieries can be placed
on the switchboard. I won't elaborate anymore, until I
know if this is what you need.
DannyC
 
I'm wondering, if they are opening a form to update the Excel files? If so, perhaps an OnOpen event that would add a timestamp to a table called "UpdateTracking" and increment the Hit Counter by 1.

Now, if you want to replace the value of the Hit Counter and timestamp with the latest hit, then you could make an Update Query (as opposed to an Append Query). Either may be called by a Macro that fires OnOpen, or by code that fires. (You can always build the macro and convert to a module with the tool). Either way, you need to have a record in there to start the table. Timestamp is default to whatever you want, and Hit Counter starts at 0.

Hope this helps.
Derek
----- (e-mail address removed) wrote: -----


All,

I have several databases (2000 and XP Client O/S is
2000) on shared server (Novel). I have distributed Excel
files to a bunch of users that are updating their files
from these databases (accounting type stuff).

Does anyone have the code that will allow me to record
in the database everytime someone refreshes one of their
Excel, a hit if you will. At this point I don't need to
trap there Id or anything just a table that will have a
Hit counter and maybe the time of the Hit..

Thanks for all your help,
Tom Olsen
 
Well that is simple enough isn't it? Make a table and then call a log routine wherever they are clicking their magic button, eh?

dim rstemp as dao.recordset
set rstemp=currentdb.opensrecordset("mylogfile",dbopendynaset)
rstemp.addnew
rstemp![UserName] = myUser
rstemp![TimeStamp] = time
rstemp![DateStamp] = date
rstemp.update

You want to know the user without having to ask?

Ah! Check this bit of wisdom!!

http://www.mvps.org/access/api/api0008.htm
 
set rstemp=currentdb.opensrecordset("mylogfile",dbopendynaset)
rstemp.addnew
rstemp![UserName] = myUser
rstemp![TimeStamp] = time
rstemp![DateStamp] = date
rstemp.update

strSQL = "INSERT INTO MyLogFile (UserName, TimeStamp, DateStamp) " & _
"VALUES (""Eric"", #12:33:41#, #2004-01-13#)"

db.Execute strSQL, dbFailOnError


Opening an entire table as a dyanaset (1) loads the network and (2) locks
out other users.

B Wishes


Tim F
 
Back
Top