I am trying to export 4 reports to excel so all reports got to one workbook and uses 4 tabs/worksheets. I can use the following for a table/query and it works great i get the tabs/wooksheet.
DoCmd.TransferSpreadsheet acExport, , "90JJ AR by Rej", "C:\Documents and Settings\bconner\Desktop\Access to Excel.xls", True
DoCmd.TransferSpreadsheet acExport, , "90JJJ AR by FSC", "C:\Documents and Settings\bconner\Desktop\Access to Excel.xls", True
But I need something exactly like this to export a report. I have formulas in this report and I can export it doing the outReportData command with no problems but I need 4 reports on specific worksheets in one workbook. The transferspreadsheet doesnt work because it is looking for the table or query name not a report name. This is what I currently do. But it overrides each report. Need one in each tab worksheet. Any help would be great
Private Sub Command626_Click()
Dim outReportData As String
Dim xlFileName As String
outReportData = "ODL EXPORT PRICING"
outReportData = "SUNBRELLA EXPORT PRICING"
outReportData = "SHARKSKIN EXPORT PRICING"
outReportData = "VISTA EXPORT PRICING"
xlFileName = "G:\SUE'S STUFF\WORKING DESKTOP\2013 WESTLAND\EXACT FIT\NEW PARTS\NEWPARTS.XLS"
DoCmd.OutputTo acOutputReport, outReportData, acFormatXLS, xlFileName
DoCmd.TransferSpreadsheet acExport, , "90JJ AR by Rej", "C:\Documents and Settings\bconner\Desktop\Access to Excel.xls", True
DoCmd.TransferSpreadsheet acExport, , "90JJJ AR by FSC", "C:\Documents and Settings\bconner\Desktop\Access to Excel.xls", True
But I need something exactly like this to export a report. I have formulas in this report and I can export it doing the outReportData command with no problems but I need 4 reports on specific worksheets in one workbook. The transferspreadsheet doesnt work because it is looking for the table or query name not a report name. This is what I currently do. But it overrides each report. Need one in each tab worksheet. Any help would be great
Private Sub Command626_Click()
Dim outReportData As String
Dim xlFileName As String
outReportData = "ODL EXPORT PRICING"
outReportData = "SUNBRELLA EXPORT PRICING"
outReportData = "SHARKSKIN EXPORT PRICING"
outReportData = "VISTA EXPORT PRICING"
xlFileName = "G:\SUE'S STUFF\WORKING DESKTOP\2013 WESTLAND\EXACT FIT\NEW PARTS\NEWPARTS.XLS"
DoCmd.OutputTo acOutputReport, outReportData, acFormatXLS, xlFileName