Importing Text Files

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
 
G

Guest

You are missng most of the information the TransferText method needs. See
VBA Help for TransferText.
 
G

Guest

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. ??
 
G

Guest

Take the word Optional with a grain of salt.
You need to supply the table name and the filename.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top