Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 27th, 2007, 02:25 PM
Matt
Guest
 
Posts: n/a
Default Output the results of a query to Excel

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!

  #2  
Old February 27th, 2007, 03:55 PM
DavidB
Guest
 
Posts: n/a
Default 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!

  #3  
Old February 28th, 2007, 07:55 PM
Matt
Guest
 
Posts: n/a
Default 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!!!

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles