Click to See Complete Forum and Search --> : search on 4 recordsets


jtracy
November 29th, 1999, 08:01 AM
I am using an access backend and DAO for this program.

I am trying to do a search on a home phone number that will bring up four recordsets that go with this home phone. I know how to do a search on just one recordset, but have no idea how to do this with four recordsets.

Please help me!

November 29th, 1999, 12:09 PM
Create fifth recordset, append all records from 4 recordsets and make your search. Or make your search in a first recordset, if nothing found then in a second one and so on.
Vlad

Ravi Kiran
November 30th, 1999, 12:34 AM
Faster than brute force method of searching all recs would be to create an new record with INNER JOIN or its variants..
Ex from MSDN:
SELECT fields
FROM table1 INNER JOIN table2
ON table1.field1 compopr table2.field1 [AND
ON table1.field2 compopr table2.field2 OR
ON table1.field3 compopr table2.field3)];

compopr: is a comparision operator, like <, > , <=, etc

RK