Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2007
    Posts
    6

    Question Unanswered: Export from a table

    My co-worker asked me to post this question, as she's been having a bit of difficulty with it.

    I've used DoCmd.transfer text with other projects to export a table in Access to a text file, and I am trying to do the same here, but with no success. I keep getting this error:

    The Microsoft Access database engine could not find the object <name>. Make sure the object exists and that you spell its name and the path name correctly. (Error 3011)

    Here's the code:

    Code:
    Public Function EXPORT_Inspections()
    
    
        DoCmd.TransferText acExportFixed, "Export1", "Inspection_EXPORT", "c:/exp.txt", True, ""
            
    
    End Function
    Thanks in advance!

    Regards,

  2. #2
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388
    Interesting this exact question was also posted a couple weeks back on a different forum http://forums.databasejournal.com/sh...ad.php?t=46708

  3. #3
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    DoCmd.TransferText acExportFixed, "Export1", "Inspection_EXPORT", "c:/exp.txt", True, ""
    Did you do a copy and paste here? Because you have a forward slash after the drive ("C:/") instead of a backslash ("C:\"). That might have something to do with it.

    Also, if you don't use the last argument you can leave it out completely and also delete the comma after "True", so the complete line becomes

    Code:
    DoCmd.TransferText acExportFixed, "Export1", "Inspection_EXPORT", "c:\exp.txt", True
    Sam

Posting Permissions

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