ApplePirate
Programmer
I have a module that i use to import a number of files from a set location.
Is there a way to tag the filename onto each record as it is imported so i know where the record came from.
this is the code im using
-------------------------------------------------------
Function importXLS_files()
Dim FileName As String
FileName = Dir("//File Loading Area/" & "/*.xls"
If FileName <> "" Then
Do Until FileName = ""
DoCmd.TransferSpreadsheet acImport, "8", Table1, _
"//File Loading Area/" & FileName, False, ""
FileName = Dir()
Loop
End If
MsgBox ("Import Complete!"
End Function
-------------------------------------------------------
Never ever, bloody anything, ever
Is there a way to tag the filename onto each record as it is imported so i know where the record came from.
this is the code im using
-------------------------------------------------------
Function importXLS_files()
Dim FileName As String
FileName = Dir("//File Loading Area/" & "/*.xls"
If FileName <> "" Then
Do Until FileName = ""
DoCmd.TransferSpreadsheet acImport, "8", Table1, _
"//File Loading Area/" & FileName, False, ""
FileName = Dir()
Loop
End If
MsgBox ("Import Complete!"
End Function
-------------------------------------------------------
Never ever, bloody anything, ever