I wish to call using, transfertext in vba, an import from csv file to a table.
This works fine by hand and, when saved, works fine from the save.
BUT I can find no way of finding out the name of the import specfications to be used in the statement where I have at present "import-INVFROM SAGE" which is the name in the saved Exports
DoCmd.TransferText transferType:=acImportDelim, SpecificationName:="import-INVFROM SAGE", TableName:="topinvnum", FileName:="C:\!!!!SAGE\2017hire_to_sage\transfersfromsage\INVFROM SAGE.cs", hasfieldnames:=True
Nothing seems to work but there seems to be no way to find out the specification name.
This CANNOT be this hard - so please someone tell me where I am being stupid !!
called " Import-INVFROMSAGE"
But the MSysIMEXcolumns didnt match - little bit pasted to illustrate .
The ANCILLARY.... is an old spec which worked but was deleted ages ago
But I did it again whenI got a clue that a blank I had in ( deliberately) the file name seems to screw things up - I noticed that the .csv file became #csv in the error message
So there we are - it works and is now in the MSysIMEX list -
FileType SpecID SpecName SpecType
0 1 0
0 3 1 0
850 13 ANCILLARY-GET_TOPNUM-INVOI
850 18 INVFROMSAGE 1
cant get rid an old one Ancillary... still !!!!
Meanwhile I had cheated and just did a TransferType:=acLinkDelim and worked from there
Thanks again though working step by step through helped
So I think BEWARE of anything but absolutely standard old fashioned file naming! Blanks appear to be a NoNo