Solved

ImportError from Transfer CSV file into Access table

Posted on 2008-10-06
2
340 Views
Last Modified: 2013-11-27
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
Comment
Question by:OrangeKKW
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 250 total points
ID: 22651483
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
 

Author Closing Comment

by:OrangeKKW
ID: 31503470
Thanks. It works after creating import specification
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question