Forum Discussion

mzeller1776's avatar
mzeller1776
Copper Contributor
Dec 13, 2024
Solved

Export MS Access query results to Excel

Hello, I'm trying to set it up so that a user can open a form in MS Access, click a control button, and it will run two queries automatically and export the two query results into new Excel workbook...
  • arnel_gp's avatar
    Dec 14, 2024

    you are missing something there on your code, this is the correct syntax:

    DoCmd.TransferSpreadsheet acExport,acSpreadsheetTypeExcel12Xml,"Qry Confirmations Match","I:\Customer Operations-Core\Operational QA\Dispute Services Verification\2025 DPP Verification\Correspondence Verification.xlsx", True

     

    DoCmd.TransferSpreadsheet acExport,acSpreadsheetTypeExcel12Xml,"Qry Confirmations No Match", "I:\Customer Operations-Core\Operational QA\Dispute Services Verification\2025 DPP Verification\Correspondence Verification.xlsx", True

     

Resources