ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   filtered recodset to pivot table (or not) (https://www.excelbanter.com/excel-programming/304334-re-filtered-recodset-pivot-table-not.html)

Nick Hodge

filtered recodset to pivot table (or not)
 
Robin

As far as DAO, ADO or any other type of data access, or recordset is
concerned, there is no better expert than Rob Bovey. I would stake that if
he say's it can't be done...it really can't.

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Robin Hammond" wrote in message
...
Has anyone found a way to get a pivottable to work with a filtered
recordset?

The intent is fairly simple. Filter a complex RS, pass a column, row, and
data parameter to a generic output routine, and use a pivottable to do the
output to a worksheet. It seems that although the recordset is filtered,

the
pivottable ignores the filtering and includes all items.

I'm sure I can get around it by adding an additional column and filtering
the column, pastevalues, delete the column, etc, but would rather the damn
thing behaved as it should.

Correct:
rsWhatever.Filter = "something"
Set pcOutput.Recordset = rsWhatever

Incorrect:
probably about 50 lines of nasty code adding additional columnfield and
filtering the pivottable.
Sometimes you have to question who's thinking these things up.

There's a thread with a response from Rob Bovey here saying that it can't

be
done directly, but I'd welcome other suggestions.


http://www.google.com.hk/groups?hl=e...r%3D%26hl%3Den

Robin Hammond
www.enhanceddatasystems.com






All times are GMT +1. The time now is 05:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com