transfertext

  • Thread starter Thread starter nath
  • Start date Start date
N

nath

Hi,

Could anybody help me with the correct syntax for
importing a CSV file into an access table. The file
is "test.csv" and the table is "Tbl_Test" the csv file
does have fields and is delimited.

Many thanks

Nath.
 
Hi,
The syntax is below. As soon as you type
docmd.transfertext, Access will help you with the rest.
The trick is to first do an import manually (file\get
external data\import) and save the import specifications,
you then refer to them in the code (the first test you
see).
Hope this helps,
Martin

Sub test()
DoCmd.TransferText
acImportDelim, "test", "TBL_TEST", "C:\test.csv"
End Sub
 
Back
Top