I have two recordsets open in Access. I want to cycle through the IDs in the first rs, and trying to determine if they exist in the second rs. Is there a function for doing a search or will i have to just cycle through the records in the second rs, too?
This is what I currently have:
Set rsMAIN = db.OpenRecordset("SELECT * FROM MAIN")
Set rsLOOKUP = db.OpenRecordset("SELECT * FROM LOOKUP")
While Not rsMAIN.EOF
Debug.Print rsMAIN.Fields("ID")
' // This is where I would do a lookup/search
' // on rsLOOKUP for rsMAIN.ID
rsMAIN.MoveNext
Wend
Thank you in advance!
This is what I currently have:
Set rsMAIN = db.OpenRecordset("SELECT * FROM MAIN")
Set rsLOOKUP = db.OpenRecordset("SELECT * FROM LOOKUP")
While Not rsMAIN.EOF
Debug.Print rsMAIN.Fields("ID")
' // This is where I would do a lookup/search
' // on rsLOOKUP for rsMAIN.ID
rsMAIN.MoveNext
Wend
Thank you in advance!