Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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 October 31st, 2003, 10:56 AM
Registered User
 
Join Date: Oct 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default MS Access, VBA code to copy recordset

I have written a networked copy of a database and I want to add VBA code to copy a query recordset to a file on the C: drive so I can use this file as a source for Word MailMerge. I cannot seem to find any code that will work.

There may be another way to solve the problem? I need to ensure that the search generated by a user will be available for that user as a mail merge source some hours later (another user may have generated other queries using the same code in the mean time). By saving the query to the c: drive the user can have confidence that his query results are not overwritten.

I am using MS Access 2002:)

Help! anyone!

Ivan
 
Old November 1st, 2003, 05:52 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Why not export the query as an Excel or CSV file? You can implement this in code [TransferSpreadsheet() method] or call up the menu item File|Export after selecting the query.






Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access VBA Dateddiff Function SKZ Access VBA 5 November 18th, 2008 08:38 AM
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
Events with VBA & MS Access hoen VB How-To 0 January 19th, 2006 10:18 PM
MS Access and VBA Error Diahann Access VBA 10 January 7th, 2005 05:46 PM
code to copy a query recordset to a file Ivan Access VBA 9 October 31st, 2003 06:50 PM





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