Sample output from .txt file
AL³00002³0351³02³20001³Drug1
PL||00002||0351||02||20001||Drug1
Notice that some of the fields are separated by a small 3 and others are separated by ||. I attempted to import the first file manually(External Data-Text- I then clicked Advanced and attempted to set up a text import specification called cms2
Sub importCMS()
Dim strDir As String, strFile As String
strDir = "C:\pc1_export_files\CMS\"
strFile = Dir(strDir & "*.txt")
While strFile <> ""
DoCmd.TransferText acImportDelim, "cms2", "cms01", strDir & strFile, True, ""
strFile = Dir
Wend
End Sub
The objective is to import all text files that reside in a folder called CMS. What happens is the data imports all in the same column and not separated by the apprpriate delimited. Is there a way to address the different delimiters. I think the issue is how to set up the import specifications correctly.