LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default rs.filter "Filter cannot be opened"

I have a simple excel table that is converted to a recordset. The RS field
names are "COLA", "COLB", "COLC"... etc.
I can output the field names and the complete RS to a worksheet.

My problem is I can't filter the RS.

Here's the code I use to output the data:
=============================
'output headers
For lngC = 0 To RS.Fields.Count - 1
rngCell(1, lngC + 1).Value = RS.Fields(lngC).Name
Next

RS.MoveFirst

'output the complete RS data - starting the next row
rngCell(2).CopyFromRecordset RS, 1
=============================

I tried this code, but it was not successful

RS.MoveFirst
RS.Filter = "[COLB]='17'"

rngCell(2).CopyFromRecordset RS, 1

** The error message is "Filter cannot be opened" ** when executing the
RS.Filter code.

Can Excel do RS filtering, sorting, or finding?
Is my recordset incorrectly defined?
I've referencing MS ADO 2.8 library

Thanks
- Pat
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Report Filter - "OR" instead of "AND" Multiple Filters tommcbrny Excel Discussion (Misc queries) 1 October 29th 09 03:08 AM
use "Filter" to filter one range in many worksheets at a time arrowofsun Excel Worksheet Functions 0 July 31st 07 12:56 PM
Advanced filter formula for "contains="Sept" condor_tmc Excel Worksheet Functions 2 September 15th 06 01:00 AM
how can I use "filter" but keep "title" row in sight? Erni Excel Discussion (Misc queries) 4 May 29th 06 05:11 PM
Excel will not "show all" from an Advanced Filter on a sheet with protected cells. Gareth Surgenor Excel Programming 3 May 20th 04 10:48 PM


All times are GMT +1. The time now is 07:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"