How to rewrite exported Excel file from Access query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • miss D
    New Member
    • Aug 2010
    • 11

    #1

    How to rewrite exported Excel file from Access query

    Hi,
    I have Access button with this command:


    DoCmd.TransferS preadsheet acExport, acSpreadsheetTy peExcel9, "MYS", "C:\SERVICE AWARD PROGRAM\REPORTS \reports.xls", True, "MYS"

    It transfer Access query named 'MYS' to an Excel file name report.xls.
    Everytime I click the button, I want to rewrite existing report generated previously.

    How can I do that? Right now it did not rewrite the existing report.
Working...