MS Access 2002
Part of my application loops through customers and creates a table for each then exports it in XLS format. I use this line to export:
DoCmd.OutputTo acOutputTable, “tbl_MyTable”, acSpreadsheetTypeExcel9, “C:MyReportsMyExport.xls”
This works well except for the very first export. I get a message that states:
“This operation is not available at this time…”
I break the code, manually export the table, then restart the code and all subsequent exports work without a problem.
I tried putting a save command prior to the export to see if that was the problem and it did not make a difference.
DoCmd.Save acTable, “tbl_MyTable”
I checked to be sure the output path exists.
“C:MyReports”
Any idea why the first export is causing this issue?
As always, thanks in advance for your assistance.