Importing text error

  • Thread starter Thread starter Neil Crawford
  • Start date Start date
N

Neil Crawford

Dear Someone,

I can't work out only the first field is imported when
trying to import a text delimited file with the following
command;-

DoCmd.TransferText acImportDelim, , "data", strPathName &
strFileName, -1

I only get the first column in the table (called Data)
with all the data in. I haven't specified the
argument "SpecificationName" as the help file states that
for delimited text files this argument can be left blank.

Any ideas would be gratefully received,

Regards,

Neil
 
What delimiter are you using in the text file that you're trying to import?
Show us some sample records from that text file.
 
Ken,

thanks for the interest. I've tried tab and comma
delimiters, here's an example as part of the data;-

"ContactID" "FirstName" "InitialsInName"
"LastName" "HouseName" "FirstlineAddress"

1 "Wendy" "Aulds" "Dogends" "184
Prospect Road"

I only get the ContactID field header and 1st field of
the record through,

grateful for any insight,

regards,

Neil
 
It appears that the file is delimited by the space character. In order to
import this, you'll need to create a specification that designates the
delimiter to be used. ACCESS defaults to a comma delimiter when you don't
specify a delimiter.
 
Back
Top