Sambhaji
Sambhaji

Reputation: 1010

Create new recordset by executing query on another recordset in Excel VBA

I am using Excel VBA 2003. Is it possible to create new recordset by executing query on another recordset ?

The query could look like "select * from recordset1 where "

Thanks,

Upvotes: 1

Views: 1567

Answers (1)

Alex K.
Alex K.

Reputation: 175766

You can't apply an SQL query to an existing recordset, you can use the (limited) .Filter method, iterate the rows and apply your own criteria or simply modify the query you used to open the 1st recordset to include the additional criteria.

Upvotes: 1

Related Questions