Function to find Access .accdb file's date created?

candyA25

New member
Local time
Today, 11:34
Joined
Jun 26, 2013
Messages
9
Is there a function I could use to find the date listed in the "date created" property of an Access file?
 
You can make use of the FileDateTime method?
Code:
? FileDateTime("C:\MyFolder\myFile.accdb")
05/06/2014 15:46:58
 
Does that date stay consistent after a compact repair?
 
Well that will throw the whole system out of the window. Compact & Repair would delete the whole file ! The file that exists after a C&R is a brand new file. So not only this function, but any function to retrieve the Date created would be messed up.

The only other way I could think of is to have an actual log table, to refer to.
 
Believe I found a solution:

Code:
    Dim fso, f As Object
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFile(strLocalBE)
    Dim FileCreatedDate As Date
    If f <> "" Then
        FileCreatedDate = f.DateCreated
    Else
        MsgBox "Missing data in path file -- unable to synchronize.  Contact IS.", vbCritical, "Synchronization Failed"
        Me.Label0.Caption = "Synchronization Failed -- Missing File Paths.  Contact IS!"
        Exit Sub
    End If
    
    Set fso = Nothing
    Set f = Nothing
 
Last edited:

Users who are viewing this thread

Back
Top Bottom