Last Updated by

M

Mickey

Hi,
I'd like to have a two fields that updated with the user name and
date/time of update. Please could someone advise if this is possible
and how it is done? I'd also be looking to add two more fields for the
username of the person that created the record and the date/time of
that occurence. I imagine that the same method would work for both the
created and updated fields?

Thanks for any advice,
Mickey
 
B

Bob Quintal

Mickey said:
Hi,
I'd like to have a two fields that updated with the user name and
date/time of update. Please could someone advise if this is
possible and how it is done? I'd also be looking to add two more
fields for the username of the person that created the record and
the date/time of that occurence. I imagine that the same method
would work for both the created and updated fields?

Thanks for any advice,
Mickey

Not hard, but you must restrict all updates and most creation done
from a form, and preventing users to add or change data in the tables
directly.

There are several methods to get the username, the simplest is to use
the environ() function for "USERNAME". This is not secure, because
any user can change that environmental variable. But I use it often
anyways.

The basic method has the results of that function and the now()
function populate hidden fields on the form so any changes to the
record get written to the record along with whatever else gets added
or edited.
 
M

Mickey

Not hard, but you must restrict all updates and most creation done
from a form, and preventing users to add or change data in the tables
directly.

There are several methods to get the username, the simplest is to use
the environ() function for "USERNAME". This is not secure, because
any user can change that environmental variable. But I use it often
anyways.

The basic method has the results of that function and the now()
function populate hidden fields on the form so any changes to the
record get written to the record along with whatever else gets added
or edited.


Thanks for that Bob,
I'll take look at the environ() function.

Best Wishes,
Mickey
 

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