• Access 2003 doCmd.Transfer Spreadsheet

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Access 2003 doCmd.Transfer Spreadsheet

    Author
    Topic
    #480224

    Hi I am having difficulty exporting a table called Tbl_Data_Gaps into a folder as an Excel 2003 file to J:Data AnalysisGap using an on-click event and the DoCmd.TransferSpreadsheet method – can anyone help? Seems to only offer an import and doesn’t like the way I’m defining the route to place the file (I’ve tried “”, [] and () to contain the file name). Can anyone help??

    Much obliged.

    blitzy

    Viewing 2 reply threads
    Author
    Replies
    • #1308253

      Blitzy,

      Could you please post the code for the On-Click Event? :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #1308260

        Blitzy,

        Could you please post the code for the On-Click Event? :cheers:

        HI AS REQUESTED THANKS!

        DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, Tbl_Data_Gaps, [J:Data AnalysisGap.xls], True

        • #1308267

          Hi as per my first email, have already tried in quotations… no worries will keep trying. thanks.

    • #1308264

      Blitzy,

      Try: [noparse]DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, “Tbl_Data_Gaps”, “J:Data AnalysisGap.xls”, True [/noparse]

      Here a link to the MSDN Help page for TransferSpreadsheet. :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1308275

      Blitzy,

      I just ran a test using Access 2003 using this command:
      [noparse]docmd.TransferSpreadsheet acExport,acSpreadsheetTypeExcel8, “Contracts”,”G:BEKDocsExcelTestExportTest.xls”[/noparse]
      and it worked for me. Please note the Table name {Contracts} is in quotes. :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    Viewing 2 reply threads
    Reply To: Access 2003 doCmd.Transfer Spreadsheet

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: