?
Solved

Import txt file into access

Posted on 2012-09-06
4
Medium Priority
?
503 Views
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 "---"

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

---

Open in new window

0
Comment
Question by:AntiBook
  • 2
4 Comments
 
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.
0
 

Author Comment

by:AntiBook
ID: 38372731
please see the attached
sample.txt
0
 
LVL 40

Accepted Solution

by:
als315 earned 2000 total points
ID: 38373302
Test sample
DBTxtImport.mdb
0
 

Author Closing Comment

by:AntiBook
ID: 38373403
Thanks a lot
0

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