Hello,
I have a form with a date range parameter for the user to select a start & end date, which is the condition for a query. The "On Click" property on the form's button is to run the following Macro...
Transfer Spreadsheet
Transfer Type: Export
Spreadsheet Type: Excel Workbook
Table Name: qryMonthlyChartUnion
File Name: T:\Reporting\Charts\Monthly.xlsx
Has Field Names: No
Range: (blank)
OpenReport
Report Name: rptMonthlyTracking
View: Print Preview
Filter Name: (blank)
Where Condition: (blank)
Window Mode: Normal
The idea is to send the information from the query to an existing Excel sheet that has the same name as the query the data is coming from. A different sheet arranges the data, and a third sheet in the same workbook has a chart built on the data. The report has an unbound OLE object linked to the chart to show up at the top of the report, and also has a detailed breakdown of the data directly from the query below it.
When I open the database, select the date range & click the "OK" button, everything works perfectly. The problem comes when I change the date range & run the report again. The detailed information is correct, but the chart is still the same as the last time the report was run. The query works fine, but for some reason it won't re-export the query to the spreadsheet each time the macro is run. How can this be fixed?