View Full Version : Inserting current windows user into field


albert_gouws
03-08-2006, 03:06 PM
Hi Guys, my first post here

im making a database for work and need to figure out the following

i have two people that uses a ms access db, each entering data.

i made a custom macro in the vb editor:

Public Function cUsername()
cUsername = Environ("USERNAME")
End Function

what i want to do now is, everytime a new entry is added in the table, it should add that username to the "user" cell... it should only do this once, so for example, when i enter data it will show "albert" and if i was to close it, login as "steve" it should still show "albert" under the ones i added, and not steve...

this needs to be in the table not a query or form...


thanks for your time
AG

RV
03-08-2006, 03:28 PM
Search the forum, similar questions have been asked quite often.

RV

Vassago
03-08-2006, 06:30 PM
How do they add data to your table, with a form or directly on the table?