finding file modified /created date in Access 97

  • Thread starter Thread starter Mark Tiffany
  • Start date Start date
Create a new query.
Change to SQL view.
Paste this:

SELECT MSysObjects.Id, MSysObjects.Name, MSysObjects.DateUpdate,
MSysObjects.DateCreate
FROM MSysObjects
WHERE ((Not ((MSysObjects.Name) Like "MSys*" Or (MSysObjects.Name) Like
"~*")))
ORDER BY MSysObjects.DateUpdate DESC;
 
Mark said:
Sounds pretty simple but i cant find the answer anywhere.

The problem is not in finding ways to get an MDB's creation
or modified date, but in what they mean (or don't mean).
Generally an MDB is modified everytime you open it
regardless of what you do (or don't) to it. On top of that
there are several containers with different sets of these
dates. Here is what I think is about the only one that has
significant meaning:

CurrentDb.Containers("Databases").Documents("SummaryInfo").Properties("DateCreated")

If your question was for any file instead of the currently
running database, then you could try:

FileDateTime(path)
 
First, add the Scripting Runtime library, scrun.dll, to
the References for your application. Than, add the
following to a VBA module.

Dim fsoRoot As Scripting.FileSystemObject
Dim fsoFile As Scripting.File

Dim dtmCustImportCreated as Date
Dim lngImportFileSize as Long

Set fsoRoot = New Scripting.FileSystemObject
lngImportFileSize = fsoFile.Size
dtmCustImportCreated = fsoFile.DateLastModified

The above code is excerpted from a working application
that I put together last week and have been refining up to
today.

David A. Gray
P6 Consulting
http://www.p6c.com

You are more important than any technology we may employ.
 
Back
Top