Appending exported spreadsheet

  • Thread starter Thread starter shaggles
  • Start date Start date
S

shaggles

I have a check ordering database with one form for input
and a command button that generates and Excel spreadsheet
(based on a report) and then fills in the date the check
was ordered. My code looks like this:
DoCmd.TransferSpreadsheet acExport,
8, "Check_Order_Form", "C:\Temp\Checks"& Format(Date, "mm-
dd-yy")&".xls"
DoCmd.RunSQL "UPDATE Check_Orders SET Invoice_Date WHERE
Ordered=True and Invoice_Date Is Null"
I would like to be able to append records to this
spreadsheet if I run the macro a second time. How do I
code an append to an Excel file?
 
Cannot do using TransferSpreadsheet command. This command will always write
the data onto a new worksheet in the workbook.

You'd likely need to open the EXCEL file using Automation and write the new
data directly into the cells on the spreadsheet.
 
Back
Top