Re: Using a Recordset as a Data Source for a New Query and Resulting Recordset



> I have an ADO recordset (rs1) in memory and want to run a query off of
> it, creating a new ADO Recordset (rs2) containing a subset of the
> records from the original ADO Recordset (rs1). Would anyone be kind
> enough to provide a small code snippit in VB which would allow me to
> accomplish this?

Can't be done. Whatever made you think it could?

Having said that you can clone a recordset from another recordset with
filter set.
But if you do, any changes to a record in one recordset is a change in the
other.

See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthclonex.asp
for an example

Stephen Howe


.



Relevant Pages

  • Re: SQL Select in VBA to Open Recordset
    ... The query has no knowledge of what rs2 and rs1 are. ... to loop through a recordset) ... Dim CON1 As Object ...
    (microsoft.public.access.modulesdaovba)
  • Re: Using WSH to populate a pivot cache with an ADO recordset
    ... I've tried this method and it works OK from WSH. ... However, in this case, I still need to be able to populate the pivot cache ... using an ADO recordset, because I've run previous statements on the ADO data ...
    (microsoft.public.excel.programming)
  • Re: Using WSH to populate a pivot cache with an ADO recordset
    ... cache using an ADO recordset, because I've run previous statements on ... the ADO data connection to create temporary tables which are then ... "keepITcool" wrote: ...
    (microsoft.public.excel.programming)
  • Howto set a default value for an ADO field?
    ... I am creating a recordset by code using VB6 and appending fields as a ... rs1 is the recordset with the key-pair columns and rs2 is the recordset ... rs1.Fields.Value expressions need evaluation. ...
    (microsoft.public.vb.database.ado)
  • swapping recordsets on a form
    ... I am trying to change the recordset that my form uses, ... with the intention that the form will now display the records that were ... Dim rs1 As DAO.Recordset ... Dim rs2 As ADODB.Recordset ...
    (comp.databases.ms-access)