Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 25th, 2005, 12:47 PM
len len is offline
Registered User
 
Join Date: Aug 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default query result into xls97 worksheet

How do you put the result of an access query into a range on an existing xls97 worksheet...and not use ADO?

 
Old September 26th, 2005, 08:51 PM
Authorized User
 
Join Date: Oct 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

One thing you could try is the TransferSpreadsheet method. It allows you to specify
either a table name or SELECT query object name. It also allows you to specify a range
(online MS-Access help should provide more details).

While I have not found a way to dynamically specify SQL within the command itself, here is
an example of an export using TransferSpreadsheet, which does not use ADO:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qselExpiredCustomers", "c:\ExpCustomers.xls", True





Similar Threads
Thread Thread Starter Forum Replies Last Post
Qry result to xls97 worksheet? len Excel VBA 0 August 25th, 2005 01:12 PM
Show result from query akibaMaila VB.NET 2002/2003 Basics 2 January 18th, 2005 12:43 PM
Unexpected result from the query tsimsha Classic ASP Databases 1 August 23rd, 2004 03:50 AM
Query Result mateenmohd SQL Server 2000 0 November 1st, 2003 03:53 AM
Archiving query result Ned SQL Server 2000 5 October 8th, 2003 03:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.