G
Guest
I am trying to automate the process of importing multiple .txt files. Each txt file needs to be it's own table with the table name equal to the file name
I was going to use the following code but had no clue what to put in the "AccessTable Name" variable
Also, once I have this written, compiled and debugged how do I use it in my .mdb
Thank
Mauree
ChDir ("C:\my files"
strfile = Dir("FileName*.*"
Do While Len(strfile) >
DoCmd.TransferText acImportDelim, "av-txt", "AccessTableName", "c:\MyFiles\" & strfile, Tru
'delete the file (consider moving it to an Archive folder instead.
Kill "C:\my files" & strfil
strfile = Di
Loo
End Su
'CODE ENDS
I was going to use the following code but had no clue what to put in the "AccessTable Name" variable
Also, once I have this written, compiled and debugged how do I use it in my .mdb
Thank
Mauree
ChDir ("C:\my files"
strfile = Dir("FileName*.*"
Do While Len(strfile) >
DoCmd.TransferText acImportDelim, "av-txt", "AccessTableName", "c:\MyFiles\" & strfile, Tru
'delete the file (consider moving it to an Archive folder instead.
Kill "C:\my files" & strfil
strfile = Di
Loo
End Su
'CODE ENDS