Results 1 to 8 of 8
  1. #1
    Patrick.Grant01 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    30

    Docmd.TransferText Spec File Not Found

    I am running this piece of code:

    strSpec = "Import-ValueGrowth"
    DoCmd.TransferText acImportDelim, strSpec, "tblValueGrowth", strFileName

    and I am getting an error message saying "Run Time Error 3265 - The Text File Specification Import-ValueGrowth does not exist etc"



    But the file spec does exist, it is spelt correctly etc.

    Any ideas, anyone?? This is a mystery....

    A Few more things possibly related:
    >>> Tried to delete and recreate specification, repair db, reinstall Office - no luck
    >>> Tried to create a Macro - and there are no actions after those beginning with S. (e.g. No Transfer Text action showing for a Macro...)

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    did you possibly save it in the exports dialog instead of the imports?

  3. #3
    Patrick.Grant01 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    30

    In Imports

    Adam
    Thanks for your reply. It is definitely saved in imports. As far as I can tell, it is a Text File specification.

    I have seen other reports of what appears to be the same problem with a solution that would skip the problem. ( I mean -Introduce an Error Handler and RESUME NEXT ..... )

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    isn't the import spec arg optional? you could leave it out, and just go with the default import operation that access runs.

    the other thing is, are you sure the spec you saved was a delimited import? that might be a problem too. it might be a problem if it was saved as like a fixed-width import or something like that.

    I don't know much about this, so I can't offer much more.

  5. #5
    Patrick.Grant01 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    30
    I have tried all these options without any positive result. I have the impression this is something to do with the installation of Office - but I have not been able to find any installation logs that might help. Nor have I managed to find any Windows events that give me a clue.

    Quote Originally Posted by ajetrumpet View Post
    isn't the import spec arg optional? you could leave it out, and just go with the default import operation that access runs.

    the other thing is, are you sure the spec you saved was a delimited import? that might be a problem too. it might be a problem if it was saved as like a fixed-width import or something like that.

    I don't know much about this, so I can't offer much more.

  6. #6
    eelo is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    1
    Having exact same problem and would like to learn of fix.
    The work-arounds suggested will not work in my case, because using the defaults results in an invalid import. The import works correctly with the saved specification, but I can't use that spec programmatically via 'docmd.transfertext'.

    My only other thought is that specification syntax is incorrect, but I didn't see a working example in Help. To help eliminate syntax as the culprit, can anyone confirm that they've gotten this to work with a tab-delimited text file in Access 2010, and if so, provide relevant code?

  7. #7
    domwild43 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    2

    Same Problem

    Quote Originally Posted by eelo View Post
    Having exact same problem and would like to learn of fix.
    The work-arounds suggested will not work in my case, because using the defaults results in an invalid import. The import works correctly with the saved specification, but I can't use that spec programmatically via 'docmd.transfertext'.

    My only other thought is that specification syntax is incorrect, but I didn't see a working example in Help. To help eliminate syntax as the culprit, can anyone confirm that they've gotten this to work with a tab-delimited text file in Access 2010, and if so, provide relevant code?
    Yeh im having the same problem, although mine has worked

    DoCmd.TransferText acImportDelim, strSpec, "COTUpload", objF1.Name, True

    but tends to not work most of the time, the problem is with the specification and it wont pick it up. im not sure if anyone has resolved this at all?

  8. #8
    domwild43 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    2
    Hi yes if it is the same problem as what I had, you need to save as the spec via the import wizard but on the advance settings box. once you have saved it there you can close the import process and go back to your docmd.transfertext and reference your spec in there in "'s

    (im not sure if you were doing what I did, were I thought I was referencing the spec by just referencing the wizard upload?)

    DoCmd.TransferText acImportDelim, "COT_Upload", "COTUpload", objF1.Name, True

Please reply to this thread with any new information or opinions.

Similar Threads

  1. DoCmd.RunSavedImportExport file name
    By svcghost in forum Import/Export Data
    Replies: 6
    Last Post: 02-08-2011, 08:05 AM
  2. DoCmd.TransferText acExportDelim Troubles
    By svcghost in forum Import/Export Data
    Replies: 1
    Last Post: 12-14-2010, 02:35 PM
  3. TransferText problem
    By rossib in forum Import/Export Data
    Replies: 1
    Last Post: 12-17-2009, 04:57 PM
  4. Replies: 1
    Last Post: 11-10-2009, 03:03 PM
  5. DoCmd.TransferText only if file is new
    By Coolpapabell in forum Programming
    Replies: 1
    Last Post: 10-14-2009, 01:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums