Last Updated by Who?

M

Matt W.

I have a field that has the date when the data in the form was last updated,
but what i wanted to know is who updated it if the database is on a shared
network. Any help is appreciated
 
D

Douglas J Steele

There's no way of doing that automatically in a table. The only way would be
to use a form, and put logic in the form's BeforeUpdate event to add that
information to the table.
 
M

Matt W.

I have seen it done before i just wasn't sure how it was done. Must be like
you said using logic in the event
 
D

Douglas J Steele

Assuming you've got the user's ID, it's a one-liner in code:

Me.LastUpdatedBy = "UserId"

It's knowing where to put that one line that matters... <g>

The above assumes that you've got a field in the recordset named
LastUpdatedBy, whether or not it's a textbox on the form.

If you don't know how to get the user's ID, see
http://www.mvps.org/access/api/api0008.htm at "The Access Web" for how to
get the network ID, or use the CurrentUser function if you've implemented
Access User-Level Security (i.e.: if the users have to log into the
application)
 
Top