2

Hi i have a quick question what is the VBA code that will allow me to import a CSV file into a existing table in Access 2010 with its own field names?

Thanks

1

1 Answer 1

4

this should work

DoCmd.TransferText TransferType:=acLinkDelim, TableName:="tblImport", _
        FileName:="C:\MyData.csv", HasFieldNames:=true
Sign up to request clarification or add additional context in comments.

2 Comments

np, if you could 'accept' my answer, that'd be nice :)
Because you use acLinkDelim it only links the file to Access, it does not import the data. You need to use acImportdelim

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.