Is it possible to query a DAO recordset once it has been created in VBA. Currently I create a recordset and use it for a few things, but It would be useful to be able to run a few more bits of SQL against it to check some other things. The table it is created from is large and it takes several seconds to creatye the recordset. I could insert the records into a table and query that, but would prefer to it in VBA as it gives me more flexibility.
The code I use is something like this:
strSQL = "SELECT * from table WHERE field = '" & ctlCombo & "';"
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL)
If Not rs.EOF Then
rs.MoveLast
End If
lngRecordCount = rs.RecordCount
What i would then like to be able to do is
select count * from rs where field 2 = 'abc' etc.
The code I use is something like this:
strSQL = "SELECT * from table WHERE field = '" & ctlCombo & "';"
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL)
If Not rs.EOF Then
rs.MoveLast
End If
lngRecordCount = rs.RecordCount
What i would then like to be able to do is
select count * from rs where field 2 = 'abc' etc.