Home > Archive > Microsoft SQL Server forum > July 2005 > Export to Excel in MS Access









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Export to Excel in MS Access
Rohit

2005-07-20, 1:23 pm

Hi,

I have one form in access application which shows various fields from
the database. The fields are like No of PCs a client has,No of
employees,revenue etc.

Need of the user is to filter the data on the form and export the
results.
I am using a Qury as the base for this form.Can I do it easily or i
need to write the code to do this.

Secondly can I provide a separate interface to allow user to Query and
extract the data.

Say, PC between <SomeRange> AND/ OR
Revenue Between <Some Range>

whatever result comes will be exported to the Excel file.

Please tell me if you have any solution.

Thanks in Advance.

Rohit

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/General-Dis...pict241673.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=840002
rexecampbell@yahoo.com

2005-07-20, 8:23 pm

If you can utilize a query to create the data you want, then you can do
a simple trick of exporting the data within Access to Excel with very
little code.

DoCmd.OutputTo acOutputQuery, "Name Of Query", acFormatXLS

This can be assigned to a button and you have your results. This works
great if the query is based off the actual form.

Enjoy!

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com