473,395 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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!

Feb 27 '07 #1
2 10880
DoCmd.TransferSpreadsheet

On Feb 27, 9:16 am, "Matt" <mdw233...@yahoo.comwrote:
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!

Feb 27 '07 #2
On Feb 27, 10:41 am, "DavidB" <j...@yahoo.comwrote:
DoCmd.TransferSpreadsheet

On Feb 27, 9:16 am, "Matt" <mdw233...@yahoo.comwrote:
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!- Hide quoted text -

- Show quoted text -
Thanks!!!

Feb 28 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David | last post by:
(dhl)Using 2K. I have a query I want to export to excel. There are 35,000+ lines for this query. I created a macro to run on a schedule to export the excel file to a network shared drive. I can...
1
by: Suffrinmick | last post by:
Hello Everyone I've built a database using Access 2000 which includes a query which is built using a form containing filters. No problem. When I export the results of the query to excel, (File >...
4
by: Dica | last post by:
is it possible to generate an Exel file showing the results of an sql query from an ASPX page?
3
by: RICHARD BROMBERG | last post by:
I am using the following code to run a query: DoCmd.OpenQuery "qryLocation", acNormal, acEdit The query works fine, but the results of the query display on the screen. This was helpful when I...
1
by: scottmachado | last post by:
I am currently running a marco that run a query and emails the results as an attachment in excel format. If the query has no records, I would like to email "no records found" in the first cell in...
2
by: Mike | last post by:
Hi everyone, I found the Access reports too limited to do what i wanted so i created a module to export a crosstab query to an excel file, and then i modify it as i want. My problem is that i...
3
by: Terry161 | last post by:
I need to prepare weekly reports on how our sales people are doing, and currently have one query for each salesperson (~10). I have a button on a form that exports all of these queries to Excel,...
1
by: mike_boghossian | last post by:
Good morning, I am a relatively novice access user. I was given the grand assignement yesterday of outputting queries for a sales organization to excel and repeating this once a week. The...
7
by: alf8kitty | last post by:
Hello, Im still very new to php and am having a problem. I return a MySQL query to a form in my php page and I want to be able to export the form data to Excel when the users clicks a link (or a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.