Subqueries
Subqueries allow you to embed one SELECT statement within another. By placing a subquery in a query's criteria, you can base one query on the result of another. Figure 11.38 shows an example. The query pictured finds all the clients without projects. The SQL statement looks like this:SELECT DISTINCTROW tblClients.ClientID,
tblClients.CompanyName FROM tblClients
WHERE tblClients.ClientID Not In (Select ClientID from tblProjects)
Figure 11.38. A query containing a subquery.

This query first runs the SELECT statement SELECT ClientID from tblProjects. It uses the result as criteria for the first query.