I've created a subroutine to import delimited text into an existing table. Basically, I'm trying to automate the Wizard by creating a check box that will then automatically import those files I've checked off. However, when I run the code it kicks back saying that F1 is not a field in my existing table.
Is there anyway to bypass the acImportDelim command from validating the non-existant field headings in my text file against the already existing field headings in my table?
Previously, I'd created a work around for this by importing the data into a dummy table then automatically running an APPEND query to update the real table with the dummy tables data but this seems a bit cumbersome. Any suggestions?
Sub ImportText(strTbl As String, strLoctn As String)
Import the file using the Wizard, creating a new table from the text file.
Save the Imports Specs, (Advanced )
I empty the table of all records and rename the fields as required.
I again import the text file, this time into the previously created table.
(This is to ensure all is working OK)