How It Works

First, you created a text file that contained comma-delimited records. You then created a procedure to import the comma-delimited file to your database.

Sub TestTransferText()

DoCmd.TransferText acImportDelim, , _

"tblEmails", "C:\Temp\emails.txt", True

End Sub

The TransferText method imported the comma-delimited file into a new table called tblEmails, as shown in Figure 7.4. Note that the parameter for the SpecificationName was left blank because it is not required when working with delimited files.

0 0

Post a comment