Are you familiar with SQL? I think most people would use SQL to perform a query according to certain requirements.

You can create a recordset by executing an SQL query, and then use that recorset however you want.