Solved

ImportError from Transfer CSV file into Access table

Posted on 2008-10-06
2
338 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
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 250 total points
Comment Utility
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
Comment Utility
Thanks. It works after creating import specification
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now