Connecting Tech Pros Worldwide Help | Site Map

Output the results of a query to Excel

Matt
Guest
 
Posts: n/a
#1: Feb 27 '07
Hi All,

I am currently outputting the results of a query to an Excel Workbook
using the following line of code:


DoCmd.OutputTo acOutputQuery, queryName, acFormatXLS, , True


What this is doing is asking the user where to specify where the file
will be saved and then opens the file. What I would like to do is to
just open a new workbook without asking the user to specify the file
save. It would be like opening excel and pasting the results of the
query in ... if the user wants to save they can later.


As always, thanks in advance for any help!

DavidB
Guest
 
Posts: n/a
#2: Feb 27 '07

re: Output the results of a query to Excel


DoCmd.TransferSpreadsheet

On Feb 27, 9:16 am, "Matt" <mdw233...@yahoo.comwrote:
Quote:
Hi All,
>
I am currently outputting the results of a query to an Excel Workbook
using the following line of code:
>
DoCmd.OutputTo acOutputQuery, queryName, acFormatXLS, , True
>
What this is doing is asking the user where to specify where the file
will be saved and then opens the file. What I would like to do is to
just open a new workbook without asking the user to specify the file
save. It would be like opening excel and pasting the results of the
query in ... if the user wants to save they can later.
>
As always, thanks in advance for any help!

Matt
Guest
 
Posts: n/a
#3: Feb 28 '07

re: Output the results of a query to Excel


On Feb 27, 10:41 am, "DavidB" <j...@yahoo.comwrote:
Quote:
DoCmd.TransferSpreadsheet
>
On Feb 27, 9:16 am, "Matt" <mdw233...@yahoo.comwrote:
>
>
>
Quote:
Hi All,
>
Quote:
I am currently outputting the results of a query to an Excel Workbook
using the following line of code:
>
Quote:
DoCmd.OutputTo acOutputQuery, queryName, acFormatXLS, , True
>
Quote:
What this is doing is asking the user where to specify where the file
will be saved and then opens the file. What I would like to do is to
just open a new workbook without asking the user to specify the file
save. It would be like opening excel and pasting the results of the
query in ... if the user wants to save they can later.
>
Quote:
As always, thanks in advance for any help!- Hide quoted text -
>
- Show quoted text -
Thanks!!!

Closed Thread