Reputation: 3845
What do I need to add to
DoCmd.TransferText acLinkDelim, tableName:="myLinkedTableName", _
fileName:="c:\myFolder\myFile.csv", _
HasFieldNames:=True
if the fields in c:\myFolder\myFile.csv
are separated by ;
?
If DoCmd.TransferText
does not have such option, is there an alternative way to connect to a file as table programatically?
Upvotes: 0
Views: 112
Reputation: 55806
Link the file manually using the wizard. Specify the separator as semicolon.
Save the import specification. Remove the link.
Now, specify the import specification to use when creating a new link:
DoCmd.TransferText acLinkDelim, tableName:="myLinkedTableName", _
fileName:="c:\myFolder\myFile.csv", _
HasFieldNames:=True, _
SpecificationName:=YourImportSpecification
Upvotes: 1