Date Table Record was Last Updated

G

Gail

I have a simple Access database, with only one table. I have a form for
updating it. But whenever ANY field is changed on the record, I want to
record a date/timestamp of when the record changed. I have been unable to
locate information on how to do this. Your help would be appreciated.
 
A

Allen Browne

Use the Before Update event procedure of the form to record the date and
time of the update.

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.[NameOfYourDateFieldHere] = Now()
End Sub
 
J

John Vinson

I have a simple Access database, with only one table. I have a form for
updating it. But whenever ANY field is changed on the record, I want to
record a date/timestamp of when the record changed. I have been unable to
locate information on how to do this. Your help would be appreciated.

Add a date/time field to your table (let's call it WhenChanged). In
the Form's BeforeUpdate event put code like

Private Sub Form_BeforeUpdate(Cancel as Integer)
<put any validation code here>
Me!WhenChanged = Now
End Sub


John W. Vinson[MVP]
 
Top