It's possible. You'll need to write Access VBA code that uses Automation to launch Excel and open the workbook; then open a recordset on the query and use Excel's CopyFromRecordset method to place the data into the worksheet.
If you search the web or the newsgroups (e.g. at Google Groups) for some of the above keywords you should find examples of the sort of coding involved.
On Thu, 8 Jun 2006 11:56:01 -0700, pokdbz <pokdbz[ at ]discussions.microsoft.com> wrote:
[Quoted Text] >I have an Export statement: >DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, >"PHQChartQuery", "C:\PHQChart.xls", False > >There is a file already in that location named the same thing >I would like to substitute the new data on the worksheet PHQChartQuery that >is already in the file PHQChart. > >The reason I would like to do this is I have a graph on that Excel file that >I would like applied to the data I would be putting into it. > >When I export it just adds another worksheet called PHQChartQuery1 but does >not have the graph information like it does on PHQChartQuery. > >So is this possible? > > >
-- John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
|