Smartin said:
I scrounged around in the FileSystemObject properties expecting to find
the answer to this, but failed. But I'm not very familiar with it either.
Maybe someone knows of an API call?
It depends what you're looking for.
The rest of us have been assuming that he (or she) is asking about creation
date, created by, etc. for rows in tables. If that's the case, then no,
there are no API calls that can help.
Your mention of FileSystemObject sounds as though you're assuming creation
date, created by, etc. for files. There's no way I'm aware of to determine
who created or modified the file using API calls, but you can certainly get
the dates. However, you can get those dates using FSO as well:
Dim objFSO As Object
Dim objFile As Object
Dim strFilePath As String
strFilePath = "C:\Folder\File.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strFilePath)
Debug.Print strFilePath & " was created on " & _
objFile.DateCreated
Debug.Print strFilePath & " was last modified on " & _
objFile.DateLastModified
Debug.Print strFilePath & " was last accessed on " & _
objFile.DateLastAccessed
Randy Birch has a good example of how to get the dates using API calls (and
even how to change the dates) at
http://vbnet.mvps.org/code/fileapi/filedatetime.htm
(Obligatory warning: Randy's site is aimed at VB programmers. There are
significant differences between the controls available for forms in VB and
in Access. Because of that, many of Randy's examples won't port directly
into Access. Looking at this particular sample, though, I think it should
work in VB with no changes other than removing the references to .Text when
assigning values to the text boxes)