text transfer

J

JIM.H.

Hello,
I am using the following format to import data from a
comma delimited file.

DoCmd.TransferText acImportDelim, ,MyTable, fileNamePath,
False

My first column is actually a text type in MyTable and in
the file it is a number which has some zeros on the left
side. The problem is when the text file is transferred to
the table, first column looses zeros at the left side of
the number. How can I keep zeros in there?
Thanks,
Jim.
 
R

Rosco_t89

Jim,
Access is assuming that the data in that column is
numeric, therefore it is importing as a numeric type and
dropping the preceding zeros.

You need to create an import specification. In the
specification declare that column as text, that will
retain the preceding zeros.
Hope this helps
Rosco
 
Top