Ashok Gupta
Ashok Gupta

Reputation: 2297

Import Tab delimited Text File to Access Database

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

Answers (1)

David-W-Fenton
David-W-Fenton

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

Related Questions