Append query with username and date

D

Dan

I am using an append query to add a new line to my table - one of the field
in this table is "Update_Date" and one is "Updated_By".
How via this query I can populated those two fields with the current
date&Time and current username of the user .
Many thanks,
Dan
 
A

Allen Browne

In query design view, type this into a fresh column in the Field row:
Now()
Below that indicate the field you want this value assigned to.

Do a similar thing with:
CurrentUser()
for the other field.

Note that CurrentUser() always returns "Admin" if the database is unsecured.
If you wanted the Windows user, use the GetNetworkUserName() function from
here:
http://allenbrowne.com/ser-53code.html#GetNetworkUserName
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top