Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / July 2007

Tip: Looking for answers? Try searching our database.

Text File Spec doesnt exist error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JonWayn - 30 Jul 2007 10:14 GMT
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
tina - 30 Jul 2007 14:36 GMT
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

> 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,
[quoted text clipped - 4 lines]
>
> Thanks for any replies
JonWayn - 31 Jul 2007 05:08 GMT
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.

> if you're running the import spec using a VBA procedure, try adding the
> following code to the beginning of the procedure, as
[quoted text clipped - 32 lines]
> >
> > Thanks for any replies
John Nurick - 31 Jul 2007 05:36 GMT
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.

>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,
[quoted text clipped - 4 lines]
>
>Thanks for any replies
--
John Nurick - Access MVP
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.