Tracking user changes

G

Guest

I have a client/case database with multiple tables and several users. When a
user modifies any field in a client or case record, I'd like to record the
current user and the date of the modification. I don't want a running
activity log, simply one date and current user field per record to reflect
the last change made. I could code every field on the forms to update these
fields on a change, but it seems there should be an easier way to make this
work. I'm having a brain block, however, and would appreciate any
suggestions. Thank you.
 
R

Rick B

If you want to add a "last changed timestamp" simply add a new field to your
table and the forms which are used to change the data.

In the form's "before update" event, put code in to populate that field with
something like...

TimestampField=CurrentUser() & " " & Now()


Rick B
 
R

Rick B

Note: If you do a search for "tracking changes" or "timestamp" you should
find a bunch of previous posts out there that might have other sggestions.
Typically, the tabledesign or formscoding groups would get most of those
question.

Rick B
 
G

Guest

This is exactly what I needed. I was thinking on a field level when I should
have been thinking on the form level. Thank you very much - and I did find
some other posts about coding the fields. I'm on it now. Thanks again.
 
G

Guest

Rick

How do I set this up so that it records the user name, date and time for the
Initial input of the data, but not update when other fields are updated or
changed??

Sorry, I know that there is a fair bit of info on this newsgroup relating to
this topic. I have spent a couple of hours digesting all of the info, however
I cannot seem to locate anything that meets my needs.

Can you please help?
 
T

tina

set your code in the form's BeforeUpdate event, as

If Me.NewRecord Then
' code here to add the username, and a date/time stamp,
' to the appropriate fields.
End If

the tracking data will only be updated when a new record is being added,
otherwise, Me.NewRecord is false, and the code does not run.

hth
 
G

Guest

Thanks

That works just fime!!!

Sam said:
Rick

How do I set this up so that it records the user name, date and time for the
Initial input of the data, but not update when other fields are updated or
changed??

Sorry, I know that there is a fair bit of info on this newsgroup relating to
this topic. I have spent a couple of hours digesting all of the info, however
I cannot seem to locate anything that meets my needs.

Can you please help?
 

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