D
dbguy11
I have several txt files that I import on a regular basis using an import
routine. But I have no way of identifying which file they came from if I have
to back track. I want to be able adjust my import routine so that it will
place the name of the file in a field the table its creating. Below is the
import routine I use.
Option Compare Database
Function btnImportAllA4s()
Dim strfile As String
ChDir ("D:\FTR\")
strfile = Dir("*.*")
Do While Len(strfile) > 0
DoCmd.SetWarnings False
DoCmd.TransferText acImportFixed, "FTR", _
"DLA_A4s", "D:\FTR\" & strfile, False
Kill "D:\FTR\" & strfile
strfile = Dir
Loop
End Function
Thank you in advance for assistance you can provide me.
routine. But I have no way of identifying which file they came from if I have
to back track. I want to be able adjust my import routine so that it will
place the name of the file in a field the table its creating. Below is the
import routine I use.
Option Compare Database
Function btnImportAllA4s()
Dim strfile As String
ChDir ("D:\FTR\")
strfile = Dir("*.*")
Do While Len(strfile) > 0
DoCmd.SetWarnings False
DoCmd.TransferText acImportFixed, "FTR", _
"DLA_A4s", "D:\FTR\" & strfile, False
Kill "D:\FTR\" & strfile
strfile = Dir
Loop
End Function
Thank you in advance for assistance you can provide me.