I.D. of user how changed/added data

  • Thread starter Thread starter keith morris
  • Start date Start date
K

keith morris

how do I find out who changed / added data ( access log on name )
so I can add this field and a date data was changed/added field
 
CurrentUser() function will return the Access username.

You can add fields to your table(s)
CreatedBy
CreatedOn
ModifiedBy
ModifiedOn

You can set the CreatedOn field's default value to Date() (or Now() if you
want the time as well).

You can't use the CurrentUser() as a default value in a table.

Instead, on your form you can use the BeforeUpdate event

If Me.NewRecord then
Me.CreatedBy = CurrentUser()
Else
Me.ModifiedBy = CurrentUser()
Me.ModifiedOn = Date()
end if
 
Back
Top