how do I record data input (not design) changes by different users

C

chris

I am trying to create a field in my table that would
include a users' initials and date of any changes made to
data in any row of thetable. And it would automatically
refresh this information so that if the last change made
to Row 7 was Bob V. Smith (BVS 01/24/04) and then I
changed it, it would automatically put (ME 02/03/04) upon
my saving changes to the database.

Thank you in advance!
 
B

Bas Cost Budde

chris said:
I am trying to create a field in my table that would
include a users' initials and date of any changes made to
data in any row of thetable. And it would automatically
refresh this information so that if the last change made
to Row 7 was Bob V. Smith (BVS 01/24/04) and then I
changed it, it would automatically put (ME 02/03/04) upon
my saving changes to the database.

Thank you in advance!
No go in Access. For tables, that is, there are no triggers (which you'd
need for this).

Do all your data manipulations through forms, and have AfterInsert,
AfterUpdate (no, no Delete) events that write those dates.

And, er, create two fields, one text (user) and one date (modified).
 
J

John Vinson

I am trying to create a field in my table that would
include a users' initials and date of any changes made to
data in any row of thetable. And it would automatically
refresh this information so that if the last change made
to Row 7 was Bob V. Smith (BVS 01/24/04) and then I
changed it, it would automatically put (ME 02/03/04) upon
my saving changes to the database.

Thank you in advance!

You will need to ensure that ALL data updating occurs using a Form in
order to do this. Table datasheets do not have any usable events, and
there's simply no way to do this if users have access to the table
directly.

On a Form, you can use the Form's BeforeUpdate event to store the
initials (assuming they're available from somewhere... my computer
doesn't know who's typing) in an Initials field, and the value of
Date() in a date/time field. I'd suggest NOT jamming these two
different pieces of data into one field!

The code would be something like

Private Sub Form_BeforeUpdate(Cancel as Integer)
Me!txtInitials = <get the user's initials from a table, form, ??)
Me!txtUpdateDate = Date()
End Sub
 
C

chris

thanks much!
-----Original Message-----


You will need to ensure that ALL data updating occurs using a Form in
order to do this. Table datasheets do not have any usable events, and
there's simply no way to do this if users have access to the table
directly.

On a Form, you can use the Form's BeforeUpdate event to store the
initials (assuming they're available from somewhere... my computer
doesn't know who's typing) in an Initials field, and the value of
Date() in a date/time field. I'd suggest NOT jamming these two
different pieces of data into one field!

The code would be something like

Private Sub Form_BeforeUpdate(Cancel as Integer)
Me!txtInitials = <get the user's initials from a table, form, ??)
Me!txtUpdateDate = Date()
End Sub


.
 

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