Importing a sent text file as a table to DB

  • Thread starter Thread starter Mota
  • Start date Start date
M

Mota

Hello;
When i send a table as a Text file,or receive a Table-based txt file through
Email,i cant remake table from that .txt file.Because the field names are
sent as first record of that txt file,and access can not recognize them as
field names,so cant import text file to create a table.This text file is
sent thru DoCmd.SendObject .Is there any solution to programatically send a
table as a text file thru mail,and then be able to import it to DB as a
table?(To test,i send these emails to myself)
Thank you so much in advance.
 
Mota,
Use Import/Export Specifications .
you can use DoCmd.SendObject or DoCmd.TransferText to send or export and to
import text files into or our of tables using a pre-defined specification.

To do this,
start the import, decide if the file is delimited or fixed width, Click next
select First RoW Contains field Names, then click Advanced
Now you can decide to even skip certain fields if you like, index others
etc.
Then Click on SAveAs to save your specification.


HS
 
Back
Top