The following steps show you how to create a sample query to return
records from one table in a many-to-many relationship:
- Open the sample database Northwind.mdb.
- Create the following new query based on the Order Detail table:
Query: Test
----------------------
Type: Select Query
Field Name: OrderID
Total: Group By
Field Name: ProductID
Total: Count
Criteria: >1
Field Name: ProductID
Total: Where
Show: False
Criteria: 14 or 21
Note that the use of the criteria "14 or 21" with a "Where" total on the
ProductID field returns only those order IDs that contain either one or
both of the products. The use of the criteria ">1" with a "Count" total on the same field returns only records with both products.