import specification

D

Doug_Warwick

I've got a comma-delimited file text file to import to Access. However, each
element between commas contains the Field Name followed by an equals sign
followed by the data (e.g., PolicyType=Standard, PolicyName=NewPolicy). The
elements are not positional; they do no occur in the same sequence for every
line. Is there a way to import this file, using the data on the left of the
equals sign as the Field Name and the data on the right of the equals sign as
the data field?
 
G

George Nicholson

AFAIK, there's no "Built-in" way to handle this, you'll have to roll your
own.

If doing this frequently, you could import your data into Access as a single
text field and then write a series of functions to use in an update query to
parse the contents of the giant field into separate fields using Instr(),
Len(), Mid(), etc.

Or, and especially if only doing this once, you might find it easier/quicker
to import your data into Excel as a single column and do your parsing to
separate columns with worksheet formulas (SEARCH, LEN, MID, etc.). Then
import the results to Access.

HTH,
 
D

Doug_Warwick

Thanks. I just have to put on my VBScript thinking cap to recode such that I
can dynamically capture the field name rather than having it hard coded in
the code module. This way the fact that the fields don't occur in a
positional way; else find a way to re-organize them such that they are
positional.
 
D

Doug_Warwick

Thanks. If I can't tweak some VBScript code to do what I need it to, this
sounds like a viable alternative.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top