PDA

Click to See Complete Forum and Search --> : Work Log in Access 97


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

RajSatish
Oct 14th, 1999, 04:25 PM
Hi,

If u check like this it will work

If Date = CDate(Format(Now, "dd/mm/yy")) Then
MsgBox "success"
End If