transfertext

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.
 
M

Martin Hofman

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top