Adding user name to records modified in Access

G

Guest

How would I add a user name or initials to records added, deleted or edited
in an Access database? I can record the date and time but I will need to know
which user modified records.

Thanking you in advance,
 
G

Guest

It depends on whether or not you are using Access security or not. If you
are, the CurrentUser() function will get the user logged in. If you aren't,
you can pick up the user who is logged into Windows with:
Environ("USERNAME")

Barry
 
D

Douglas J. Steele

I always cringe when people suggest using an environment variable for this
purpose, given how easy it is to reset an environment variable.

Far safer, in my opinion, is to use the GetUserName API call. See
http://www.mvps.org/access/api/api0008.htm at "The Access Web" for a
complete sample.
 

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