Is there a way to get a report to export automatically to excel when the report is closed? Or is there a way instead of viewing it to automatically export it to excel?
reports print to paper. You can 'export' them to PDF.
do you mean export the data query into excel?
if so:
vFile = "c:\temp\MyFile.xlsx"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12xls, "qsMyQuery", vFile, True
Reports don't usually come out as nice looking in Excel as they do on the Report. If you just want the raw data in Excel, you can export the data source instead.
reports print to paper. You can 'export' them to PDF.
do you mean export the data query into excel?
if so:
vFile = "c:\temp\MyFile.xlsx"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12xls, "qsMyQuery", vFile, True