Sunday, February 26, 2012

Export to Excel in MS Access

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=840002If 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!

No comments:

Post a Comment