Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference table modified date 2

Status
Not open for further replies.

DrSmyth

Technical User
Jul 16, 2003
557
0
0
GB
Hi I'm trying to check the date a table was last modified so i can run an update if it isn't today.

Something along the lines of
if date()<>table("Table1").modifieddate then
do....
end if
Not sure of the syntax for referencing the table modified date though. Can anybody help

Cheers
 
are you referring to modifications on table properties or the data in the table?

the date and time when the properties of a table have been modified can be found with something like:

Code:
Function dateupdated()
Dim db As DAO.Database
Set db = Application.CurrentDb
Dim tdf As DAO.TableDef
Set tdf = db.TableDefs("yourTableName")

MsgBox tdf.LastUpdated

End Function

for checking the last updated in the data, you have to use a field in the table itself, that is updated with Now() or so, each time the record is changed.

HTH,
fly

[blue]Typos, that don't affect the functionality of code, will not be corrected.[/blue]

Martin Serra Jr.
[blue]Database_Systems and _Applications shared across all Business_Areas[/blue]
 
I'm looking for the last time that data was added to a table, but it's a table thats created by a make table query.

so i suppose that either would work (i think)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top