problem importing delimited file by using a macro

  • Thread starter Thread starter mossard
  • Start date Start date
M

mossard

Guest
Hi,
I am really a novice in using Access macros, and I am facing with a problem.
I have a text file delimited by semicolon and I want to import it into a table.
This table contain some text, number and date fields, and almost everything gets correctly imported but two fields.
Both of them are fixed length text fields which may contain either mixed alphabetic and numeric characters or only numeric characters padded on the left with zeros.
The last case is precisely the one which gives me a problem, in that the filling zeros on the left are stripped out when importing the file with the macro (creating using the predefined Access actions).
If I import the file by hand no problem arises.
Can someone please give me a hand.
Cheers, Diego.

Ps I am using Access 2003.
 
not sure if this will work for you, but try surrounding your fixed-length text fields with quotes ["], and set up your Import Specification with a "Text Qualifier" as a quote ["]
This will then treat the whole field as one and should import "as is".
 

Users who are viewing this thread

Back
Top Bottom