code to link with a text file

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

Guest

Good morning,
I need to write code to link to a txt file one fixed width and one with "|"
delimiter.
The 'Get External Data' on the Access I have does not line up well thus the
result contains a lot of unwanted/missing data.
Thanks.
cg
 
Do the link once by hand so you can set up an Import Specification Name for
the file. When you get the Import Dialog, click on Advanced. Set up the
field names, data types, delimiters, etc. then click on Save As and give it
a name. Then use that name in a DoCmd.TransferText (See VBA Help in
TransferText for Details).
 
Thx for the tips. Will try and post result.
cg

Klatuu said:
Do the link once by hand so you can set up an Import Specification Name for
the file. When you get the Import Dialog, click on Advanced. Set up the
field names, data types, delimiters, etc. then click on Save As and give it
a name. Then use that name in a DoCmd.TransferText (See VBA Help in
TransferText for Details).
 
Have you used the Advanced button in the text import wizard to create
and save import specifications for your two files?
 
Back
Top