Reputation: 60691
DoCmd.TransferText acImportDelim, Import-Accounts, "tableImport", _
"C:\Documents and Settings\accounts.txt", True
The second parameter: Import-Accounts
is the actual name of the saved import specifications. supposedly it does NOT need to be in quotes; however in this case since there is a -
there it is treating it as if i were doing an operation.
is there a way i can force it to treat it literally instead of as an operation?
Upvotes: 1
Views: 125
Reputation: 97101
According to Access' help topic for TransferText, the SpecificationName option is "A string expression that's the name of an import or export specification you've created and saved in the current database". So I think you do have to enclose it in quotes, same as you did for TableName, which is also a string expression.
Upvotes: 4
Reputation: 4838
An obvious question would be: can you rename the saved spec? If not, can you put square brackets around it []? (This is what Access does for field names with spaces or that are reserved names) If not can you put quotes around it?
Upvotes: 1