Reputation: 2297
I have a tab-delimited text file and want to import it in MS Access using VBA code.
I have created an MS Access form and have used the DoCmd.TransferText
method:
DoCmd.TransferText(TransferType, SpecificationName, TableName, FileName, HasFieldNames, HTMLTableName, CodePage)
It works well for CSV File. I'm not sure how to do it in case of tab-delimited text files.
Any suggestions?
Upvotes: 2
Views: 8265
Reputation: 23067
Do a manual import, changing the delimiter to TAB, save the import spec, and then specify that import spec in your TransferText command.
Upvotes: 2