Access, VBA, Date Modified

  • Thread starter Thread starter Greg T
  • Start date Start date
G

Greg T

Hi, fairly new to the VBA world. I', trying to grab the Date Modified of a
table, how would I do this in VBA? I'm going to put this in a If statement.
If the table is over 7 days old than update data.
 
? CurrentDb.TableDefs("abc").Properties("LastUpdated")


as example.



Vanderghast, Access MVP
 
Michel Walsh said:
? CurrentDb.TableDefs("abc").Properties("LastUpdated")

Greg, Michel has answered your question, but I'm hoping you are clear that
this will tell you the date of the last design change, not when the data was
changed last.
 
Add a field named DateModified to the table, Data Type of Date/Time,
Default Value of Now(). When records are inserted, the value is set to
the current date time. When you do updates, you need to update the
value to Now().

Good luck!

John

Greg T brought next idea :
 
Back
Top