DAO Create recordset from recordset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone tell me how to create a recordset from a recordset?
dim db as database
dim rs1 as recordset, rs2 as recordset

set db = currentdb
set rs1 = db.openrecordset("select x, y, z from t where x = 0")

now i want to create a subset of the above recordset???

set rs2 = db.openrecordset("select x, y, z from rs1 where y = 1")
 
mdaisl said:
Can someone tell me how to create a recordset from a recordset?
dim db as database
dim rs1 as recordset, rs2 as recordset

set db = currentdb
set rs1 = db.openrecordset("select x, y, z from t where x = 0")

now i want to create a subset of the above recordset???

set rs2 = db.openrecordset("select x, y, z from rs1 where y = 1")


rs1.Filter = "y = 1"
Set rs2 = rs1.OpenRecordset()
 
Back
Top