yippie_ky_yay
Registered User.
- Local time
- Today, 13:42
- Joined
- Jul 30, 2002
- Messages
- 338
Hello,
I can use the TransferSpreadsheet method to get my query output into Excel - but is it possible to use a dynamic query?
For example, rather than:
Could I do something like?:
I know that the above doesn't work - hopefully it will illustrate what it is I'm trying to accomplish.
Thanks in advance,
-Sean
I can use the TransferSpreadsheet method to get my query output into Excel - but is it possible to use a dynamic query?
For example, rather than:
Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryMyQuery", "C:\My Documents\myQueryInExcel"
Could I do something like?:
Code:
Dim mySql as string
mySql = "Select * From myTable Where id = 4"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, mySql, "C:\My Documents\myQueryInExcel"
I know that the above doesn't work - hopefully it will illustrate what it is I'm trying to accomplish.
Thanks in advance,
-Sean