MartyConnelly
martyconnelly at shaw.ca
Tue Feb 25 16:18:00 CST 2003
Something like the following
You will have to get last updated from FileDateTime function rather than
summary info properties
Sub DateModified()
'There are 4 Database Documents:
' AccessLayout
' MSysDb
' SummaryInfo
' UserDefined
'There are DateCreated and DateModified properties in the first 3
'documents. The way to get to them:
Dim dteCreated As Date
Dim dteModified As Date
Dim db As Database
Set db = CurrentDb
dteCreated = CurrentDb.Containers("Databases"). _
Documents("SummaryInfo").Properties("DateCreated")
dteModified = db.Containers("DataBases"). _
Documents("SummaryInfo").LastUpdated
Debug.Print dteCreated
Debug.Print dteModified
'The SummaryInfo data seems to coincide with the Statistics dates shown
'in the Database Properties dialog. But, they don't coincide with the
'properties in the Properties dialog box of the Windows Explorer.
'If Err.Number = 3270 Then 'Property not in collection
'===
'Using the FileDateTime() function, e.g.: to get date last accessed
Debug.Print "File Created=" & FileDateTime(CurrentDb.Name)
'will return the last access date/time of the current database.
End Sub
or
Function SummaryInf(PropName As String) As String
Dim loDb As Database
Dim loCont As Object
Dim loDoc As Object
Dim cnt As Long
Set loDb = Application.CurrentDb
Set loCont = loDb.Containers("Databases")
Set loDoc = loCont.Documents("SummaryInfo")
SummaryInf = loDoc.Properties(PropName)
Debug.Print
loDb.Containers("Databases").Documents("SummaryInfo").LastUpdated
Debug.Print
loDb.Containers("Databases").Documents("SummaryInfo").DateCreated
'Debug.Print loDb.Containers("Databases").Documents("SummaryInfo").Container
End Function
Mark A Matte wrote:
> Hello All,
>
> Can someone point in the direction of how to capture the 'Last
> Accessed' date/time property of a A97db.
>
> Thanks,
>
> Mark A. Matte
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>