USer Details on form

popen

Registered User.
Local time
Today, 08:13
Joined
Oct 16, 2000
Messages
37
I have created a workgroup with about 12 users in it.
I need to klnow of a way in which the details of the user who creates a new record will be shown on the form itself.
I need it to be automatic, taking the user name and inputting it into a field.
Anyone know how to do this ?
 
You need to add one (or more fields to your tables). If you only want to record who added a record you only need one field. If you want to keep that information plus track who last changed a field you need two fields. If you also want to track dates, again you need either one or two fields depending on if you want to track the add event separately from the last update event.

To record who added a record - put the code in the BeforeInsert event of the form:
Me.AddedByUserID = CurrentUser()
Me.DateAdded = Now()

To record who last changed a record - put the code in the BeforeUpdate event of the form:
Me.ChangedByUserID = CurrentUser()
Me.DateChanged = Now()
 

Users who are viewing this thread

Back
Top Bottom