Tie in Windows login with database (1 Viewer)

L

lmcgowan

Guest
Hiya

I am a new access user and not absolutely sure what the boundries of access are. I am using access 2000 on a Windows 2000 platform and I was wondering if there was a way which you can tie the users windows login into a database so that the changes made can be tracked by user. I am not at all sure that this is possible. I would be greatful if someone can help me out or set me straight. If there is a way then could someone please show me how to do it and I will do my best to give it a go.

Thanks in advance

Lisa:)
 

Fizzio

Chief Torturer
Local time
Today, 20:47
Joined
Feb 21, 2002
Messages
1,885
Lisa, you can capture the users login by using the following function. How you use it is up to you! In my staff table, I keep a field for login then it makes it easy to lookup the full staff details eg Staff Name when neccessary. You could currently just add the Windows login into the table by adding only a few fields
AddedBy, AddedDate, ChangedBy and ChangedDate then on creation of a record look up the Username and date (or Now() if you prefer) and likewise for when a recors changes.

Here is the link to the function:

http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=34810&highlight=GetUserName
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 14:47
Joined
Feb 28, 2001
Messages
27,340
Or, if you are using WorkGroup security, you can force the user to join the workgroup. After which the function CurrentUser works to give you a name string.

Be warned that Access only allows you "hooks" to get into things, not actual direct support for auditing. If you cannot program it yourself, you won't have any auditing at all. It also means that if you don't do EVERYTHING from forms, you are stuck because most of what you will want to do requires event code to trap the record just before you save it.

This is NOT true, however, for some external products that support OLDB type connections. For instance, Access front-end to ORACLE or Sybase back-end - the back ends CAN do their own auditing, field-by-field if necessary.
 

Users who are viewing this thread

Top Bottom