Import txt file into access

Posted on 2012-09-06
Medium Priority
Last Modified: 2012-09-06
I have a large txt file over 50K rows contains information formatted as in the code. How do I use vba to import it into a table in Access? Each block is separated by "---"

Name:            John Doe
ID Number:       123abc
Dob:      2/1990
Code:             111
Username:          user1
Code(2):        abc123
E-mail:            jd@yahoo.com
  Name:            John Doe
  Address:         123 Main St.
                   New York, New York, 12345 United States


Open in new window

Question by:AntiBook
  • 2
LVL 93

Expert Comment

by:Patrick Matthews
ID: 38372695
Please upload a sample text file.  It does not have to be the complete file, but it does have to show all of the various nuances your source data can have.

Please sanitize the data as needed to protect privacy/confidentiality.

Author Comment

ID: 38372731
please see the attached
LVL 40

Accepted Solution

als315 earned 2000 total points
ID: 38373302
Test sample

Author Closing Comment

ID: 38373403
Thanks a lot

Featured Post

Industry Leaders: 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

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…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

850 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