Importing text into access

  • Thread starter Thread starter bob lumpkin
  • Start date Start date
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?
 
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.
 
Back
Top