0

I am trying to get the last modification date of database content, to know when to refresh some data. I thought this would work:

Static ADOCat As ADOX.Catalog
If Not ADOCat Is Nothing Then Set ADOCat = New ADOX.Catalog
If ADOCat.ActiveConnection Is Nothing Then ADOCat.ActiveConnection = "Provider=Microsoft.ace.OLEDB.12.0; Data Source=X:\MANUAL_ANALYSIS.accdb; Mode=Read"
If LastModificationDate <> ADOCat.Tables("ANALYSES").DateModified Then
     bRefreshData = True
     LastModificationDate = ADOCat.Tables("ANALYSES").DateModified
End If

However, the .DataModified returns the date when the table structure was changed, such as removing/adding fields, not the database content modification. Is there another method that can find this out for me? /J

j74nilsson
  • 146
  • 7
  • 1
    As far as I know, Access does not track individual record change timestamps unless you explicitly have a Date/Time field in the record which is either manually updated or updated via a macro on record add/change – Glenn G Jul 01 '22 at 14:05
  • Well, I do not need to track each individual record, only last time _any_ record was updated. – j74nilsson Jul 01 '22 at 14:09
  • 2
    Access does not really track or save that information for you. You need say to add a single table, and have code update that single table, and then you can pull that one record, and grab the value. – Albert D. Kallal Jul 01 '22 at 14:23

0 Answers0