I have opened a snapshot-type recordset against a lengthy query. I want to query against the recordset, but I can't get recordset.openrecordset to work for me.
Here's the code:
set rst1=currentdb.openrecordset("tbl",openforwardonly)
set rst2=currentdb.openrecordset("qry",opensnapshot)
do
set rst3=rst2.openrecordset("SELECT * FROM rst2 WHERE fld = """ & rst1!str & """", dbopensnapshot)
rst1.movenext
loop until rst1.eof
I also tried replacing rst2 in ...FROM rst2... with qry to no avail. (I didn't expect to find qry in rst2)
I'm stumped. I suppose I could dump rst2 into a temporary table, but I hate littering the database (and, oh!, the bloat)
Here's the code:
set rst1=currentdb.openrecordset("tbl",openforwardonly)
set rst2=currentdb.openrecordset("qry",opensnapshot)
do
set rst3=rst2.openrecordset("SELECT * FROM rst2 WHERE fld = """ & rst1!str & """", dbopensnapshot)
rst1.movenext
loop until rst1.eof
I also tried replacing rst2 in ...FROM rst2... with qry to no avail. (I didn't expect to find qry in rst2)
I'm stumped. I suppose I could dump rst2 into a temporary table, but I hate littering the database (and, oh!, the bloat)
Last edited: