Hi,
I have this code that gets the files last modified date, all i want it to do is instert this into a field in a table.
I think the error is quite straight forward but cant see where ive gone wrong, just need antoher set of eyes i think.
I wanted to use update but i got a bit confused. any help will be grateful.
Function ShowFileInfo(filespec)
Dim fso, f
Dim strSQL As String
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
'ShowFileInfo = f.DateCreated
ShowFileInfo = f.DateLastModified
strSQL = "INSERT INTO File_Updated (Date_Time) VALUES ('ShowFileInfo')"
DoCmd.SetWarnings warningsoff
DoCmd.RunSQL strSQL
DoCmd.SetWarnings warningson
End Function
I have this code that gets the files last modified date, all i want it to do is instert this into a field in a table.
I think the error is quite straight forward but cant see where ive gone wrong, just need antoher set of eyes i think.
I wanted to use update but i got a bit confused. any help will be grateful.
Function ShowFileInfo(filespec)
Dim fso, f
Dim strSQL As String
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
'ShowFileInfo = f.DateCreated
ShowFileInfo = f.DateLastModified
strSQL = "INSERT INTO File_Updated (Date_Time) VALUES ('ShowFileInfo')"
DoCmd.SetWarnings warningsoff
DoCmd.RunSQL strSQL
DoCmd.SetWarnings warningson
End Function