capture CreatedBy in record (1 Viewer)

kobiashi

Registered User.
Local time
Today, 04:53
Joined
May 11, 2018
Messages
258
Hi

I have some VBA code that logs user activity on my database and stores it in a table

I'm trying to display the username in a field when they created a new record.

since i already have this data, what would be the best way to use this?

useractivity table

ID | timestamp | username | activity

is there a pre build function within access for this or am i better off using the data on the table? and if so how?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 11:53
Joined
May 7, 2009
Messages
19,233
Use the beforeinsert event of the form to set the textbox.

Private sun Form_beforeinsert()
Me.textbox=environ("username")
' or use the function you have to set the value of textbox
End sub
 

Users who are viewing this thread

Top Bottom