Importing Text Files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have look at a couple of posting relating to this subject but some how I
can not make the transfer work. I have three txt files that I need to
transfer into Access 2003 using the same name of the file for table name. I
try the following code from Doug Steele:
strFolder = "\\S863A55\333542$\AIPqb\dB\TAR\SampleFetch\"
strFile = Dir$(strFolder & "*.txt")
Do While Len(strFile) > 0
DoCmd.TransferText acImportDelim
strFile = Dir$()
Loop
But no files are transfered
 
You are missng most of the information the TransferText method needs. See
VBA Help for TransferText.
 
Thanks for getting back so soon, but the help file mentions that all the rest
of items are optionals and since for my needs the file name for table name is
what I need and the headers in the txt files are the columns that I am
looking for, I thought that was the only thing that I needed to do. ??
 
Take the word Optional with a grain of salt.
You need to supply the table name and the filename.
 
Back
Top