Date mdb was created

  • Thread starter Thread starter Steven
  • Start date Start date
S

Steven

Is there a way to return when a mdb file was created?

Like CurrentDb.Name will return the Name of the file.

What is the command the will return the date and time the
file was created?

Thank you,

Steven
 
Is there a way to return when a mdb file was created?

Hi Steven,

To get the create/modify info for the MDB, click Tools -> References and add a reference to the Microsoft Scripting Runtime. Then:

Dim fso As Scripting.FileSystemObject
Dim fil As Scripting.File

Set fso = New Scripting.FileSystemObject
Set fil = fso.GetFile(CurrentDB.Name)

Debug.Print fil.DateCreated, fil.DateLastAccessed, fil.DateLastModified

Set fil = Nothing
Set fso = Nothing


To get similar info on tables

Debug.Print CurrentDB.TableDefs("tablename").DateCreated (and .LastModified)


Jay
 
Back
Top