Hello,
I use TransferSpreadsheet on a daily basis using a Table as a
datasource. I was under the impression from reading Help that you could
also use a Query as the datasource. This is my code: (simplified here)
strSQL = "SELECT [Part Number] FROM [Orders];"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, strSQL,
Path, True
I get an error message:
Microsoft could not find the object: "SELECT [Part Number] FROM
[Orders];"
I tried saving it as a query and used the Query Name and got the same
result.
What am I missing?
Thanks,
Hank Reed