Hi,
Wondering…
I have a set of 11 textfiles coming in, which need to be imported into 11 distinct tables.
The text files have no headers
The text files may have different field separators and different data formats.
My problem:
I want to use VBA to import the text files. Do I really need to have (number of different formats) * 11 import specifications?
Being a simple Excel expert I thought perhaps I could pass the formats as a parameter to some import function that looks something like:
Private Function ImportTable(sTextFileName as String, sTargetTable as String, sFieldDelim as String, sDateFormat As String, bFourDigitYear as Boolean, bLeadingZeroes as Boolean)
But TransferText doesn’t allow this, or does it?
Question 2: If I save an import spec, Access insists on creating field names, if I try to import another text file (targetting same table, same # of fields), Access complains that the field names don’t match. WHat gives?