C
cbgraham_asu
This problem seems so silly, I"m sure there is an easy answer:
I have a parameter query set up. The user opens a form and picks the
parameters they want from a drop down box. I want the results to go
directly to a new excel workbook.
I started with:
DoCmd.OpenQuery "Q_Open_Orders_All", acViewNormal, acEdit
DoCmd.RunCommand acCmdOutputToExcel
DoCmd.Close acQuery, "Q_Open_Orders_All"
But it's annoying because it opens the query, pauses, and then opens
the spreadsheet. If I could just hide the query so it would stay in
the background it would be perfect.
Next I tried:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"Q_Open_Orders_all", _
"C:\OpenOrders.xls", True
Which is nice b/c it gets the data to Excel w/o showing the user the
query, but I don't want to save the data at any specific location.
I'd rather have the user decide whether or not save and to where.
This would be okay if I just didn't have to specify a file location.
Any ideas????
MANY THANKS!
I have a parameter query set up. The user opens a form and picks the
parameters they want from a drop down box. I want the results to go
directly to a new excel workbook.
I started with:
DoCmd.OpenQuery "Q_Open_Orders_All", acViewNormal, acEdit
DoCmd.RunCommand acCmdOutputToExcel
DoCmd.Close acQuery, "Q_Open_Orders_All"
But it's annoying because it opens the query, pauses, and then opens
the spreadsheet. If I could just hide the query so it would stay in
the background it would be perfect.
Next I tried:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"Q_Open_Orders_all", _
"C:\OpenOrders.xls", True
Which is nice b/c it gets the data to Excel w/o showing the user the
query, but I don't want to save the data at any specific location.
I'd rather have the user decide whether or not save and to where.
This would be okay if I just didn't have to specify a file location.
Any ideas????
MANY THANKS!