Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 January 20th, 2006, 07:07 AM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to anukagni Send a message via Yahoo to anukagni
Default Run query & Exporting the Data to Excle

Ni Guy's:),

I have created an report through front end using an combo Box and an command button , "It Wroks". Now i want to run an query through front end similarlly by using combo box and command button and export the resulted data to excel sheet . But when i give the VB coding

"'OpenQuery.
Docmd.OperQuery "QueryName" , ............."

    I am geting the whole query running and whole data in the database, instead of getting the selected Names data and what is the command for exporting the data to excel?

         Weather i am able to get the data by runcommand option or by other
Pls help me in this issue so that my head ill lose some weight.

thanks in advance from my deep heart...:)


P.A.P.Raguv
 
Old January 20th, 2006, 11:44 AM
Registered User
 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You may want to set up a macro.
The first command would be to open the query. If you have set the query up to prompt for input, it will do so. Otherwise, the query will just run as you have set it up.
The second commmand can be transferspreadsheet, outputto, or use the runcmd and choose export.

Hope this helps a little bit.

 
Old January 21st, 2006, 04:49 AM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to anukagni Send a message via Yahoo to anukagni
Default

Hi,
   I.. want to know about the method to export the data to Excel but U.. told me run macro in the Access. Probs is I don't konw to creat and run macro i the access.But i can do it in Excel.Excel isn't it not similar to the access.pls give me an example in the issue so that i can able to start up with the macro in the Access .May be at the time of runnig the query or after getting the result from tje query..
  Thank for ur response., reply me wit out fail pls..
Bye

P.A.P.Raguv





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Exporting Query Data From Access to Excel JimInSouthernCal Access VBA 3 December 21st, 2007 08:34 AM
Chapter 16: Exporting query data to Excel 5tr0ud BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 0 October 9th, 2007 04:23 PM
Exporting an Query anukagni Access 1 June 9th, 2006 06:21 AM
Query data and exporting data from one sheet to an testman Excel VBA 2 April 28th, 2005 02:40 PM





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