thardyjackson
There appears to be a bug in Access; the "DoCmd.OutputTo acOutputQuery" changes the select clause.
A snippet of code that may help:
'DoCmd.OutputTo acOutputQuery, objectName, "ExcelWorkbook(*.xlsx)", filePath & outputFileName
DoCmd.TransferSpreadsheet acExport...