[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 346
  • Last Modified:

ImportError from Transfer CSV file into Access table

I am trying to import csv file into Access table using the following codes. For some reason, it only imported the first column and populated errors for other columns/fields in error table. I got the same issue when using macros too. Can you please help? Thanks

Sub TransferFile()
DoCmd.TransferText acImportDelim, , "MtTableName", "C:\Automate\IA\OrigFile.csv", True, ""
End Sub
0
OrangeKKW
Asked:
OrangeKKW
1 Solution
 
Rey Obrero (Capricorn1)Commented:
you will need an import specification  to do this

see this link

http://support.microsoft.com/?kbid=208991#tocHeadRef


Sub TransferFile()
DoCmd.TransferText acImportDelim,"ImportSpecificationName" , "MtTableName", "C:\Automate\IA\OrigFile.csv", True, ""
End Sub
0
 
OrangeKKWAuthor Commented:
Thanks. It works after creating import specification
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now