Appending exported spreadsheet

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?
 
K

Ken Snell

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top