Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Unanswered: DoCmd Export Fails

    This has been working for a long time but all of a sudden it fails.

    I have no idea hat has chenge?
    Code:
    Private Sub Command100_Click()
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2003, "qryCBLaQuintaProg", "D:\flw\Access\YTD", True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2003, "qryCBPalmDesertProg", "D:\flw\Access\YTD", True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2003, "qryCBPalmSpringsProg", "D:\flw\Access\YTD", True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2003, "qryReMaxDesertProg", "D:\flw\Access\YTD", True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2003, "qryWIND_CVProg", "D:\flw\Access\YTD", True
    MsgBox "Finished Exporting YTD to D:\FLW\Access\YTD Rick"
    End Sub
    Any suggestion would be greatly appreciated.

    Thanks . . . Rick

  2. #2
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372
    Check if the path name "D:\flw............" still exist.

  3. #3
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Export Spreadshheet 3010 Error

    Path name does exist.

    I get this error . . .
    "Table <name> already exists. (Error 3010)
    You tried to create or rename a table with a name that already exists in this database. Choose another name, and then try the operation again."

    I thought that if you Export and "Save Formatted" that that creates a link which overwrites the spreadsheet each time the export is executed.


    What am I missing here?

    Thanks Rick

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Meh, if the table shouldn't be there, I'd just [attempt to] delete the tables before running the imports again.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372

    Hello Rick!

    Try to do this via "OUTPUT TO" method.
    Look at attachment (word, zip).
    This method going to wade the table if the same exist.
    Attached Files Attached Files

  6. #6
    Join Date
    May 2009
    Posts
    29
    I believe your missing the file name in the path of where the file is to be saved to. At least thats how all my commands look of this nature. Try

    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2003, "qryCBLaQuintaProg", "D:\flw\Access\YTD\FILENAME.XLS", True

Posting Permissions

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