rio
Registered User.
- Local time
- Tomorrow, 02:57
- Joined
- Jun 3, 2008
- Messages
- 124
hi.. I used this module to save the file directory in new created table. This code i got from searching in the google. so the problem is.... how to save the folder name to in that table.
there is a few folder in (CurrentProject.Path & "\Kml Shape File\") :
1. lotname
2. place
3. Hotel
what should i put at ?????????? (red colour) this part in this code.
there is a few folder in (CurrentProject.Path & "\Kml Shape File\") :
1. lotname
2. place
3. Hotel
Code:
Private Function FilesAndDetails()
On Error GoTo Err_FilesAndDetails
Dim rs As Recordset
Dim vDir As Variant
Dim FilewPath As String
FilewPath = (CurrentProject.Path & "\Kml Shape File\") 'sPath must end with a back slash, sPath = "C:\Windows\"
CurrentDb.Execute "Delete tTempFiles.* from tFiles;"
Set rs = CurrentDb.OpenRecordset("tFiles")
vDir = Dir(FilewPath & "*.*")
Do Until vDir = ""
rs.AddNew
rs!FilePathName = FilewPath & vDir
rs!FilePath = FilewPath
[COLOR=Red]rs!FileFolde = ??????????????[/COLOR]
rs!FileName = vDir
rs!ModifiedDate = FileDateTime(FilewPath & vDir)
rs!FileSize = FileLen(FilewPath & vDir)
rs.Update
vDir = Dir
Loop
rs.Close
Set rs = Nothing
DoCmd.Requery
Exit_FilesAndDetails:
Exit Function
Err_FilesAndDetails:
MsgBox Err.Number & " - " & Err.description
Resume Exit_FilesAndDetails
what should i put at ?????????? (red colour) this part in this code.