colins5286
New member
- Local time
- Yesterday, 21:31
- Joined
- Feb 13, 2007
- Messages
- 9
I have a table which contains file names and locations. I then display these on a form. The form has unbound fields on it such as DateLastModified, DateCreated.
I would like to use VBA to retrieve the information from the file. I have some code which displays a few fields but I am unable to get it to display information from the 'summary' of the file properties. Keywords, Category etc...
The code I have so far has been placed in the OnCurrent event of the form.
I would like additional fields to be displayed. Any help would be much appreciated.
Thanks
Colin
I would like to use VBA to retrieve the information from the file. I have some code which displays a few fields but I am unable to get it to display information from the 'summary' of the file properties. Keywords, Category etc...
The code I have so far has been placed in the OnCurrent event of the form.
Code:
Private Sub Form_Current()
'Set the file details
Dim f As File
Dim fso As New FileSystemObject
Dim namedfile As String
namedfile = FileName 'This is the only bound field on the form
Set f = fso.GetFile(namedfile)
'Set the unbound fields on the form
Me!datelastmod = CStr(f.DateLastModified)
Me!attr = CStr(f.Attributes)
End Sub
I would like additional fields to be displayed. Any help would be much appreciated.
Thanks
Colin