Skip to content
Advertisement

How to make a Query in MS-Access that returns the intersection of three other queries?

I have a “search” form that allows the user to input location, date, or ID. This form generates three queries, which return appropriate results, or all records if no search term was input for that category. I intended to make a fourth query that took the intersection of the first three, but have been unable to make it work. I’ve reviewed similar questions about using the SQL INNER JOIN function but can’t make it work. SQL from each of my three queries is below. (or, if there’s a better way to do this, let me know. I tried doing it all in one query and it was a mess).

Qry_ByDate:

Qry_ByLoc:

Qry_ByID:

Advertisement

Answer

The intersection of the 3 queries returns all the rows for which apply all the conditions in the WHERE clauses:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement