Timestamp record after update Access 2000

B

Bill

Is it possible to add a date/time field to an Access 2000
table that will be updated everytime a user updates that
record?
 
C

Cheryl Fischer

Yes, it is possible but you will need to write some code.

You could add a field of Date/Time type, named LastUpdated, to your table.
Put the field LastUpdated on your form, making its Visible Property equal to
'No' if you do not want your users to see it. If you do not mind your
users seeing the date and time the record was last updated, set its Visible
Property to 'Yes' and set the Enabled Property to 'No' (so that your users
will not be able to edit the field). Then, in the BeforeUpdate event of
your form, insert the following code:

Me!LastUpdated = Now()

hth,
 
L

Larry Linson

Is it possible to add a date/time
field to an Access 2000 table that
will be updated everytime a user
updates that record?

Cheryl described how you do it, but let me add -- you must _limit_ your
users to updating from the Form. There is no way to add an automatic
timestamp if you allow them access to Datasheet view, or if they can update
from a Query (it's OK if you update from a Query, provided you set the
Timestamp field in your Query).

Larry Linson
Microsoft Access MVP
 

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