Importing text into access

B

bob lumpkin

I have a text file that was generated from FrontPage. The
format is:
"<field name>=<text-string>&<field name>=<text-string>"
I want to import into access without changing the
file. Is there a way?
 
J

John Nurick

Hi Bob,

Access's built-in import routines can't do this. The choice is between
writing Access VBA code to read and parse the textfile into fields and
records, and append these to Access table(s); or massaging the textfile
into a standard format (e.g. tab-delimited or CSV) that Access can
import.

If the textfile
(a) has a CR+LF between records (but nowhere else) and
(b) has the same fields in the same order in each record,
the massaging that's needed is little more than using Word's wildcard
search to
(i) find everything from a paragraph mark up to "=" and replace with
paragraph mark;
(ii) find everything from "&" to "=" and replace with a delimiter such
as "|" or tab.
 

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