Log User access every time they log into an Access Database

R

r.tadjbakhsh

Hello,
I'm looking for an easy way to log every time a user accesses an
Access DB. I would rather not deal with user groups if possible.
Security is not much of an issue, I just simply would like to end up
with a table which documents when a user logged into the db, and when
they closed the db. My experience with VB is limited but I can find
my way around. I understand it might require use of the OnOpen
event. If you have any code that you can supply that would be great.

Thanks in advance for any help that you can provide.
 
A

aaron.kempf

you should be using SQL Server, then you could log a username, etc--
whenever anyone calls a particular stored procedure.
you see-- stored procedures can do multiple things

create procedure spLogin
as
Select securityLevel
from AppLogins
where username = suser_sname


insert into loginlog(username, date)
select suser_sname, getdate


then.. whenever someone fires this stored procedure-- it will return
rows _AND_ log the username


-Aaron
 
T

Tony Toews [MVP]

a a r o n . k e m p f @ g m a i l . c o m said:
wow that might work ok.. until someone disables macros!

In which case the entire app stops working.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
A

aaron.kempf

correction-- the entire app may continue working.. your custom
security stuff doesn't work.. and people can change data without being
forced to follow the vba rules that you think are soooooo terrific.

with ADP-- things work great, you can put your logic-- into these
things called 'sprocs' and then you can use them from a webpage, from
excel, from sharepoint, from dap, from Access- you can reuse logic
when you choose to use a real database.

you cannot run Access Module code anywhere else in the whole wide
world.

It's just a crappy idea to put business logic in mountains of VBA.
I'll never agree with that.

-Aaron
 

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