Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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 September 4th, 2006, 02:07 AM
Registered User
 
Join Date: Sep 2006
Location: Paranaque, , Philippines.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lushh
Default Report Generation Problem

hi guys. i am currently working on an human resources information system. i am currently using ms access 2003 and the report form looks like this:

http://i114.photobucket.com/albums/n...16/reports.jpg


the function of this form, is once a button is clicked, the appropriate report for that button will be generated and will automatically be viewed in ms excel. the problem is that i don't know the VBA code that will perform this function. i read books about access, but unfortunately i can't find the exact answer to my question. so, if anyone could give me some idea on where i can find sample codes for this function, i would very much appreciate it. thanks in advance.
 
Old September 5th, 2006, 07:11 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Hi,

   Here is code I use to do the same thing:

DoCmd.OutputTo acOutputQuery, stDocName, acFormatXLS, "C:\SpreadsheetName.xls", True

If you look up OutputTo in VBA help, you will get the syntax, but it is self explanatory. The True at the end overwrites any other file with the same name in the same location.

stDocName is the name of the query.

Does this help?




mmcdonal
 
Old September 5th, 2006, 07:16 AM
Registered User
 
Join Date: Sep 2006
Location: Paranaque, , Philippines.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lushh
Default

yes.. it did.. thank you very much... i really do appreciate it.. =)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Report Generation kotaiah Excel VBA 0 September 14th, 2006 08:26 AM
Report Generation Application jmss66 VB How-To 2 February 9th, 2006 01:31 PM
Report Generation in JAVA Bhushan XML 0 May 18th, 2005 05:26 AM
report generation with crystal reports a_pathak Classic ASP Basics 0 April 4th, 2004 11:20 PM
Report generation question pankaj_daga Access 5 December 21st, 2003 06:23 AM





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