Creating Queries in Access 2010

  • 6/15/2010

Finding Unmatched Records

When two tables are in a one-to-many relationship, you can create a Find Unmatched Records query to identify any records in the table on the “one” side that have no corresponding records in the table on the “many” side. For example, in the Northwind sample database, because the Customers and Orders tables are in a one-to-many relationship, you could identify customers that have never placed an order.

Create a Find Unmatched Records Query

  1. Click the Create tab.

  2. Click Query Wizard.

  3. Click Find Unmatched Query Wizard.

  4. Click OK.

    httpatomoreillycomsourcemspimages613748.jpg
  5. Click the table in which you want to find unmatched records.

  6. Click Next.

    httpatomoreillycomsourcemspimages613750.jpg
  7. Click the table or query with related records.

  8. Click Next.

    httpatomoreillycomsourcemspimages613752.jpg
  9. If necessary, click the field in the left pane that is in the table on the “one” side of the relationship.

  10. If necessary, click the field in the right pane that is in the table on the “many” side of the relationship.

  11. Click the Match button to identify the equivalent fields.

  12. Click Next.

    httpatomoreillycomsourcemspimages613754.jpg
  13. Click the name of a field to display in the query results.

  14. Click Add.

  15. Repeat steps 13 and 14 as needed to add fields to the display.

  16. Click Next.

    httpatomoreillycomsourcemspimages613756.jpg
  17. Type a name for the query.

  18. Click Finish.

    httpatomoreillycomsourcemspimages613758.jpg