RE: Button to Export Data to Excel?



Interesting, I was responding to:
can I create a command button to export the filtered records to MS Excel

Didn't anything about analysing, not even in your subject.

Sorry, but I don't have an answer for you. I am not familiar with that.
--
Dave Hargis, Microsoft Access MVP


"Cam" wrote:

Klatuu,

I don't mean to export the data to Excel, but rather a command button to
analyze the current data in form view to Excel just like the button in the
toolbar "Analyze it with Microsoft Office Excel" function.

"Klatuu" wrote:

To export data to Excel, you use the TransferSpread*** action or method.
It only accepts the names of tables and queries, so it will not accept your
form's recordset.

The easiest way would be to create a query that mirrors your form's
recordset and filtering and use the TransferSpread***.
--
Dave Hargis, Microsoft Access MVP


"Cam" wrote:

Hello,

I have a form with filtered records. What VBA code/ option can I create a
command button to export the filtered records to MS Excel? I tried the button
wizard, but did not see any option to export data. Thanks
.


Loading