Date data last modified in a table

  • Thread starter Thread starter Bob Watson
  • Start date Start date
B

Bob Watson

New to Access and I have made an
attempt to RTFM ... however it is
not clear to me how to get date info
on the last time data in a table
was modified (added/edited/deleted, etc).
I see how you get the last time the
structure of a table was modified.
Is there a way (surely there is) to
tell the last time data in a file was
modified??

Thanks for any help,
Bob
 
No, there's no way.

Assuming you're using a form to do your updates, you can put logic in the
form's BeforeUpdate event to update a LastModified field anytime a change is
made, and you can add a LastUpdated field to update queries, but if you're
updating the table directly, you're out of luck.
 
Access does not provide this for you, but if your changes are made through a
form it's easy enough to track the last date of change for each record.

Just add a date/time field to your table, and name it (say) UpdatedOn.

In the form's BeforeUpdate event, include this line of code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.[UpdatedOn] = Now()
End Sub

The last date any record was added/edited in Table1 is:
DMax("UpdatedOn", "Table1")
 
Thanks - seems like something
MS should fix in an upcoming version ...
but what do I know, just being a Rookie.

Thanks again
Bob
________________
 
Back
Top