Hello I am new with Access and VBA,
My purpose is to export Queries in one workbook but different worksheets. I am working with Access 2007.
When I add an Ouput file for the Queries to go in a specific workbook I get a compiling error stating: "Compile error.in query expression 'Year([IssDate]'. The error is numbered 3075.
Below is my code in which I did not specify an Output file.
DoCmd.OutputTo acOutputQuery, "Prem Adjustment Due Asset", "ExcelWorkbook(*.xlsx)", "", False, "", , acExportQualityPrint
DoCmd.OutputTo acOutputQuery, "Prem Adjustment UEP Liability", "ExcelWorkbook(*.xlsx)", "", False, "", , acExportQualityPrint
DoCmd.OutputTo acOutputQuery, "Triton Benefit Reserve by GAAP and division", "ExcelWorkbook(*.xlsx)", "", False, "", , acExportQualityPrint
DoCmd.OutputTo acOutputQuery, "Triton DAC by GAAP and Division", "ExcelWorkbook(*.xlsx)", "", False, "", , acExportQualityPrint
My guess is I should use TransferSpreadsheet but I am not sure how to use it.
I hope this makes sense.
Thanks for your help.
My purpose is to export Queries in one workbook but different worksheets. I am working with Access 2007.
When I add an Ouput file for the Queries to go in a specific workbook I get a compiling error stating: "Compile error.in query expression 'Year([IssDate]'. The error is numbered 3075.
Below is my code in which I did not specify an Output file.
DoCmd.OutputTo acOutputQuery, "Prem Adjustment Due Asset", "ExcelWorkbook(*.xlsx)", "", False, "", , acExportQualityPrint
DoCmd.OutputTo acOutputQuery, "Prem Adjustment UEP Liability", "ExcelWorkbook(*.xlsx)", "", False, "", , acExportQualityPrint
DoCmd.OutputTo acOutputQuery, "Triton Benefit Reserve by GAAP and division", "ExcelWorkbook(*.xlsx)", "", False, "", , acExportQualityPrint
DoCmd.OutputTo acOutputQuery, "Triton DAC by GAAP and Division", "ExcelWorkbook(*.xlsx)", "", False, "", , acExportQualityPrint
My guess is I should use TransferSpreadsheet but I am not sure how to use it.
I hope this makes sense.
Thanks for your help.