Access, VBA, Date Modified

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.
 
M

Michel Walsh

? CurrentDb.TableDefs("abc").Properties("LastUpdated")


as example.



Vanderghast, Access MVP
 
A

Allen Browne

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.
 
J

JvC

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 :
 

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

Top