Home > Archive > MS Access data conversion > December 2005 > How to convert/transform txt to DB









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to convert/transform txt to DB
zbud

2005-12-05, 3:24 am

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 Mar
tha Fuentes
Contact_StreetAddres
s 185 S. Oleander
Contact_Address2
Contact_City Fellsme
re
Contact_State FL
Contact_ZipCode 3294
8
Contact_WorkPhone
Contact_HomePhone 93
4-5723-Cathy
Contact_Email
Contact_Work:
Contact_FullName Gle
nda Fuentes
Contact_StreetAddres
s 250 S. Magnolia St.
Contact_Address2
Contact_City Fellsme
re
Contact_State FL
Contact_ZipCode 3294
8
Contact_WorkPhone
Contact_HomePhone (7
720 571-9999
Contact_Email
Contact_Work: I would appreciate a lap-top for my son.

BillCo

2005-12-05, 7:24 am

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.

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com