By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,029 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,029 IT Pros & Developers. It's quick & easy.

How to convert/transform txt to DB

P: n/a
how can I get this type date into Access:

Where the Contact_xxxxx is the field name and the other text the data

Contact_FullName Martha Fuentes
Contact_StreetAddress 185 S. Oleander
Contact_Address2
Contact_City Fellsmere
Contact_State FL
Contact_ZipCode 32948
Contact_WorkPhone
Contact_HomePhone 934-5723-Cathy
Contact_Email
Contact_Work:
Contact_FullName Glenda Fuentes
Contact_StreetAddress 250 S. Magnolia St.
Contact_Address2
Contact_City Fellsmere
Contact_State FL
Contact_ZipCode 32948
Contact_WorkPhone
Contact_HomePhone (7720 571-9999
Contact_Email
Contact_Work: I would appreciate a lap-top for my son.

Dec 5 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Here's and idea:

1. Create a temporary table for importing the data with two fields:
fldDescription and fldData. Use the import text wizard to create an
import spec and save it. The import spec could use colons (":") and
tabs as field separaters, depending on how the data is presented in the
text file.

2. Use docmd to transfer text into the temp table and specify the
import spec you saved.

3. Each new line will create a new record in tblTemp with
Contact_XXXXXX as the fldDescription and the fldData as data

4. open a recordset on the temp table and loop through the records,
adding the data to the appropriate field in your actual data table.

5. Delete * from tmpTable when done.

Dec 5 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.