Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005

    Unanswered: Exporting text file from Access

    Okay - it's me again. I guess I'm going to have to find a way of paying back for all the help I've got from here. I have a really bizarre problem. I'm trying to export from Access 2 text files which later on combine into one.

    This line of code works:

    DoCmd.TransferText acExportDelim, "IPROutputSpec", "tblHeaderOutput", "D:\temp\tblHeaderOutput.txt", False

    This one which is directly under it doesn't and they are practically the same:

    DoCmd.TransferText acExportDelim, "IPROutputSpec", "Output", "D:\temp\Output2.txt", False

    I have tried all sorts. If I change it to export excel files, it works.
    I tried creating a new database and running each line separately in each db. When I did that the one that wasn't working before worked, but then the previously working one, stopped working.

    The error message I get is: Run-time error 3011: "The Microsoft Jet Database engine could not find the object tblHeaderOutput#txt. Make sure the object exists and that you spell its name and the path name correctly.'

    It seems to be seeing the .txt as #txt.... I've been trying to work round this for the past 6 hours. Has anyone got any insight into this?

    Have a Merry Christmas all and thanks for your help so far.

  2. #2
    Join Date
    Mar 2002
    Bielefeld, Germany

    Did you rename one of the fields of your table?

    Then you have to change IPROutputSpec also, otherwise you'll get that (spectecular unhelpful) error message.

  3. #3
    Join Date
    Dec 2005
    Hey, thanks a lot. It worked!!! Worth my coming in on my day off! Have a beautiful New Year

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts