discussed before but doesnt work "get user login name"

  • Thread starter Thread starter luis
  • Start date Start date
L

luis

I want to capture the network user login or computer name
into a subform in my database when the user tries to add
a record I have tried the following

http://www.mvps.org/access/api/api0008.htm

function which I found the link here in the forum but
either im doing something wrong or im missing something
I tried using it on got focus, on click on just about
everything and I get an error.
* the expression me not result in the name of a macro,
user defined function or event proceedure
* there may have been an error evaluating the function,
event, or macro

Where and how do I add this function to my database I
tried using an unbound text box
 
You would take that code and place it into standard module in ms-access. You
can call the module name anything, but you must use a unique name, and
something that will no conflict with and function code you place inside.

At that point, you can then simply place in the forms before update event,
you can then stuff who edited the record by using:

me!LastEditBy = fOSUserName()

The above assumes you created a field called LastEditBy. You could also add
a date/time field, and go:

me!LastEditTime now()
 
Back
Top