The text file specification "x" does not exist

CarlSeil

New member
Local time
Today, 04:07
Joined
Nov 30, 2020
Messages
14
Using Access Business 365.

I am getting this error 3625 'The text file specification "x" does not exist. You cannot import, export, or link using the specification."

I created the specification by performing a successful export. I right clicked on the table, chose Export|Text, chose the delimiters I wanted, and successfully exported to the file. I then verified the file by opening it and visually inspected. I then went to External Data|Saved Exports to make sure that the export specification was indeed saved. I clicked on the name of the export specification and copied it to my clipboard. Then used it in the following code:

Code:
Private Sub btnCreateFile_Click()
  DoCmd.TransferText transfertype:=acExportDelim, _
   specificationname:="Export-tblTempPositivePayChecksRpt", _
   tablename:="tblTempPositivePayChecksRpt", _
   FileName:="p:\Carl\FileOutPut.txt", _
   hasfieldnames:=True
End Sub

When I click on button "btnCreateFile" I get the error 3625 saying the specification does not exist, but it clearly does and I can repeatedly run it by using External Data|Saved Exports.

When I search on this problem, all I can find is examples that reference some bug in Access 2010.
 
I am guessing, but some times names with characters will not run in code even though they are legit. This is common in file names. I would rename it and get rid of the "-" to see if that helps.
 
That's a good suggestion. That export specification was what Access suggested, so I just went with it. I will re-export and save it under a new name.

For what it's worth I have found DoCmd.RunSavedImportExport works file. Only, I do not have control over where it is saved or what the output file is called. If I cannot get DoCmd.TransferText to work, I may go with this RunSavedImportExport and rename the file pretty sure that will work, so I do have a workaround, it seems.

I mainly use DoCmd.TransferSpreadsheet for this, but since I need a different delimiter, I having to go back to the drawing board on code that has been happily working for seven years.
 
I am guessing, but some times names with characters will not run in code even though they are legit. This is common in file names. I would rename it and get rid of the "-" to see if that helps.

That seemed to do it. Created a new one and gave it a simple name of "pp1" and away it went.
 
Gasman,
You may be onto something with that. And I may have inadvertently fixed it because the second time I did it, I used the Advanced button and the Save As... button. The simpler name might have been a coincidence.

That's a great link
 
Yes, confused the hell out of me (not hard I admit :) ) as you can see the file name sitting there, but Access says it cannot find it.?
 
And to top it off, I rarely save the "steps" since I rarely do the same thing twice, and if I do, I do it in VBA. This is the first time I have tried to exports something with a non-standard delimiter. Usually, I just use the .TransferSpreadsheet method, and I have a little wrapper function I have and repeatedly use, so everything goes out as an Excel file or CSV.

I learned something today, because I rarely save exports and would have done the same thing as the author did (and probably over and over because I didn't catch the distinction).
 
I seem to recall that @isladogs created a function to allow changes to those specs, but that adds another level of complexity to a new user?
It is on here somewhere.
 

Users who are viewing this thread

Back
Top Bottom