Import Tab delimited Text File to Access Database

8.2k views Asked by At

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?

1

There are 1 answers

2
David-W-Fenton On

Do a manual import, changing the delimiter to TAB, save the import spec, and then specify that import spec in your TransferText command.