Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two Recordsets, search field in (1) for values from (2)

Status
Not open for further replies.

hondurab

Technical User
Jul 19, 2001
14
US
I'm not sure how to go about converting an existing function to use a list of search values from an additional, new recordset. It presently opens one (1) recordset and searches a memo field for values that match a certain format (& tallies, using arrays). I want to, instead, get names from a second table (2) and search for these names in the memo field of all the records in the first recordset.

How do I manage two open recordsets? Can I just grab a list from the new recordset and run through this list?

Obviously I need some big clues! Thanks for any help.
 
Hi,

I think it is possible to open as many recordset as you want.
If you'd like to use 2 recordsets to find values, the logic should be like below

First, set rstA = "Select Names from TableA"
Second, set rstB = "Select Memo from TableB Where Names = " & rstA("Names")

Is this what you mean? It first builds a recordset that collects Names from TableA
Then based on the value, it builds another recordset that collects Memo records.

Hope it work.

Tin Tin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top