scottr
Oct 14th, 1999, 03:48 AM
Hi im new to access and what i want to do is create a new table that would be populated with infomraiton about updates/modifcations to all the table/querries/macros/ everything. This is some code that I have right now
Dim dbs As Database, tdf As TableDef
Dim strList As String
' Return reference to current database.
Set dbs = CurrentDb
' Enumerate through QueryDefs collection.
For Each tdf In dbs.TableDefs
' Evaluate LastUpdated and 'DateCreated properties.
If tdf.LastUpdated = Now Then
strList = strList & " " & tdf.LastUpdated & " " & tdf.DateCreated & " " & vbCrLf & tdf.Name & " " & tdf.LastUpdated & " " & tdf.DateCreated
End If
Next tdf
Debug.Print strList
Set dbs = Nothing
End Sub
the problem is it doesnt pick anything up for the now() date even through i modifed and created a new table. I also did a test where i put the following line in
tdf.LastUpdated <= Now
and that worked, but i only want data to be posted if there is data to post.
Any help would be greatly appriceated.
as always thanks for everything
scott
Dim dbs As Database, tdf As TableDef
Dim strList As String
' Return reference to current database.
Set dbs = CurrentDb
' Enumerate through QueryDefs collection.
For Each tdf In dbs.TableDefs
' Evaluate LastUpdated and 'DateCreated properties.
If tdf.LastUpdated = Now Then
strList = strList & " " & tdf.LastUpdated & " " & tdf.DateCreated & " " & vbCrLf & tdf.Name & " " & tdf.LastUpdated & " " & tdf.DateCreated
End If
Next tdf
Debug.Print strList
Set dbs = Nothing
End Sub
the problem is it doesnt pick anything up for the now() date even through i modifed and created a new table. I also did a test where i put the following line in
tdf.LastUpdated <= Now
and that worked, but i only want data to be posted if there is data to post.
Any help would be greatly appriceated.
as always thanks for everything
scott