DateCreated, LastUpdated Properties Example

This example displays the dates and times when the Customer recordset in the Nwindex.mdb database was created and last updated.

To create the Nwindex.mdb database, run the Microsoft Excel example for the CreateDatabase method.

Dim creation As Variant, changed As Variant
Dim db As Database, td As TableDef
Set db = Workspaces(0).OpenDatabase(Application _
    .DefaultFilePath & "\NWINDEX.MDB")
Set td = db.TableDefs("Customer")
creation = td.DateCreated
changed = td.LastUpdated
MsgBox "The " & td.Name & " table was created on " & creation _
    & " and updated on " & changed
db.Close