One thing you could try is the TransferSpreadsheet method. It allows you to specify
either a table name or SELECT query object name. It also allows you to specify a range
(online MS-Access help should provide more details).
While I have not found a way to dynamically specify SQL within the command itself, here is
an example of an export using TransferSpreadsheet, which does not use ADO:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qselExpiredCustomers", "c:\ExpCustomers.xls", True
|