Results 1 to 2 of 2
  1. #1
    Join Date
    May 2006
    Posts
    2

    Unanswered: Access 2007 Accessing Directory Information

    I have an Access 2007 that access files on the server and can tell if a database has been posted. What I need to do is to retrieve the date the
    database was posted on the server from the Date Modified property.

    How can I access the information?

    Thanx

  2. #2
    Join Date
    Oct 2004
    Location
    Oxfordshire, UK
    Posts
    89
    You can get most file properties using the windows scripting object libray like this:

    Public Function GetDateLastModified(ByVal FilePath As Variant) As Date
    'This function needs a reference to C:\Windows\System\wshom.ocx or similar
    Dim objFileSystem As New FileSystemObject

    If Nz(FilePath, "") = "" Then Exit Function

    If Not objFileSystem.FileExists(FilePath) Then Exit Function

    With objFileSystem.GetFile(FilePath)
    GetDateLastModified = .DateLastModified
    End With

    End Function

  3. #3
    Join Date
    May 2006
    Posts
    2
    Thanx for your help. It worked perfectly!

  4. #4
    Join Date
    May 2006
    Posts
    2

    Thanx

    Thanx for your help. It worked perfectly!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •