Solved

MS Access - Is there any easy way to import a .txt file into Access Table

Posted on 2011-02-15
7
315 Views
Last Modified: 2012-05-11
I have really large files in .txt format that has to be imported in Access.  Unfortunately the Import feature keeps producing an error file and none of the data from the txt file are being imported.
0
Comment
Question by:ArisaAnsar
[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
  • 3
  • 3
7 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34899132
if the reason is the size of the text file, you can break the text file into several smaller text files and import the smaller text files one at a time.

0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 34899151
Define a table with the required number of fields all set as text 255 and import to that.  
0
 

Author Comment

by:ArisaAnsar
ID: 34899155
I have approximately 20 txt files and will have to do this three times a month going forward.  I'm trying to find an easy way.  Do you have another suggestion?
0
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!

 

Author Closing Comment

by:ArisaAnsar
ID: 34899206
Thanks!  That worked.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34899208
you can do that by creating an import specification first, then use command
docmd.transfertext acimportdelim, "import  spec Name",<path to text file>, true

what version of access are you using?
0
 

Author Comment

by:ArisaAnsar
ID: 34899239
Im using Access 2003.
Where would I add the command?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34899260
never mind
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

739 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