Solved

ImportError from Transfer CSV file into Access table

Posted on 2008-10-06
2
341 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

719 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