Text File Spec doesnt exist error

G

Guest

Why is it that when I go to import a text file using a file spec that I
either just created on the fly, or one that had existed, no matter what one,
I get the following error message: the text file specification, <specname>
does not exist. You cannot import, export or link using the specification

This happens only in one of many databases I created.

Thanks for any replies
 
T

tina

if you're running the import spec using a VBA procedure, try adding the
following code to the beginning of the procedure, as

On Error GoTo Err_Connect
DoCmd.TransferText

then add the following code to the end of the procedure, as

End_Connect:
Exit Function

Err_Connect:
Select Case err.Number
Case 2495
' the TransferText error that "initializes" the saved link
specification.
Resume Next
Case Else
MsgBox err.Number & " - " & err.Description
Resume End_Connect
End Select

i got this tip from here in the newsgroups; i've no idea why it works, but
it does - for me, anyway.

hth
 
G

Guest

Well, if all you want to do is suppress the error message, then that works.
As far as importing anything goes, it doesnt. And if you're not doing it in
VBA, you're out of luck.
 
J

John Nurick

Searching the newsgroups and the Microsoft site doesn't suggest that
there's a "standard" cause of this problem. One possibility is that
this database has become corrupt; if so, the obvious place for the
problem is in the system tables MSysIMEXSpecs and MSysIMEXColumns
which store the import/export specifications.

These pages have information on likely causes of corruption and what
to do about it:

http://allenbrowne.com/ser-25.html
http://www.granite.ab.ca/access/corruption/causes.htm

One thing I'd try is to create a new database and import everything
from the existing one *except* the import/export specifications.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top