?
Solved

Import Text File into Acess using a macro

Posted on 1998-12-18
4
Medium Priority
?
428 Views
Last Modified: 2006-11-17
I have a macro to import a text file into Access. I am using the Transfer Text Action in the macro section. Under Transfer Type I have chosen the Import Delimineted Type.
The .txt file I am importing must be a | (pipe or pike?) delimeted file. When it imports to a new table, all the columns from the text file remain in Field 1 of my table, all seperated by the | symbol. how can I have my macro specify the | type for the delimeted function.
The obvious solution of changing the text file to a file type such as Excel will not be possible in this case.
0
Comment
Question by:Lanscaper
[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
4 Comments
 

Author Comment

by:Lanscaper
ID: 1971543
Edited text of question
0
 
LVL 8

Accepted Solution

by:
Helicopter earned 400 total points
ID: 1971544
Run the import wizard once (file/get external data/import, select a txt filename, any one will do since you don't need to use the results) and set the delimiter to the |(select advanced on page 2 of the wizard) then save that import specification as a given name. Then in your macro select this name as your import spec.
 
 
 
   
 

0
 

Author Comment

by:Lanscaper
ID: 1971545
You are exactly right. I must admit, I found the same answer through trial and error and using the help files. However, I still feel this was a challenging subject. Thank you for your response.
0
 

Expert Comment

by:rdc092298
ID: 1971546
I have tried to perform it with a macro and a import specification but it still doesn't work. I'm using Office 97.

0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

765 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