Importing multiple Text files with "Field Name: Field Value" into a Table (1 Viewer)

dudezzz

Registered User.
Local time
Today, 08:51
Joined
Feb 17, 2005
Messages
66
Hi,

I have about 100 text files of the following format:

Name: John Doe
Address: 123 Main Street
Zip: 55555

Name: Jill Doe
Address: 234 Clyborne
Zip: 66666

I need to import all these text files into a Single Table in Access. Obviously, the table would look like this:
Name Address Zip
John Doe 123 Main Street 55555
Jill Doe 234 Clyborne 66666

Due to my limited knowledge in Access, I don't know how to get this done nor use the right terminology to search (I tried in this forum but was unsuccessful).

Would appreciate if anyone can point me in the right direction to solve this problem please. Thanks!
 

Martao

New member
Local time
Today, 15:51
Joined
Jul 11, 2011
Messages
5
Re: Importing multiple Text files with "Field Name: Field Value" into a Table

I'm affraid the automatic functionality in Access to import textfiles works like a comma separated file. In your example the data is on different rows, so that probably won't work.

I suppose you could 'parse' it yourself. If you're certain the file format is the same for each file, it shouldnt be too hard to read the 3 lines and break it up so you get the last word using string manipulation.
I believe you can open the text file using the Open command.


Good luck
 

dudezzz

Registered User.
Local time
Today, 08:51
Joined
Feb 17, 2005
Messages
66
Re: Importing multiple Text files with "Field Name: Field Value" into a Table

Thanks for your response.

I actually have about 45 rows of information, to get the idea across I entered 3 rows.

Would it be possible to share a code sample please?
 

Users who are viewing this thread

Top Bottom