Date Table Record was Last Updated

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Do a search for "timestamp". This is asked and answered all the time.
 
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
 
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]
 

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

Back
Top