logo
search
Others

How to Combine Vendor Conditions in an Access Inspection Query

John WilsonJohn Wilson Sep 28, 2026 869 views

Question details

The user needs to create an Access report that includes projects where either Vendor 1 or Vendor 2 has both Ordered and Delivered statuses set to True, while the overall Inspected status remains False.

How to Combine Vendor Conditions in an Access Inspection Query
Product
Microsoft Access
Device & OS
not provided
Scenario
Combining multiple vendor criteria into a single query to generate a unified project inspection report.
Observed behavior
Currently using separate queries and reports for Vendor 1 and Vendor 2, the user wants to evaluate both sets of conditions in one consolidated query without logical conflicts.
Before you start

Ensure you have a backup of your Access database before modifying query structures, and familiarize yourself with the Query Design Grid and SQL View.

Solution 1Recommended

Use Boolean Logic with Proper Parentheses

Use logical AND/OR operators with correct grouping in the query criteria to evaluate both vendors simultaneously.

When dealing with multiple conditions across different vendors, proper parenthesis placement is critical. Without parentheses, Microsoft Access may evaluate the AND and OR conditions in the wrong order, returning incorrect inspection records.

1
Open Query Design

Open your Access database, navigate to the 'Create' tab, and click on 'Query Design'. Add the table containing your vendor and inspection fields.

2
Switch to SQL View

Right-click the query tab and select 'SQL View' to manually input the logical expression.

3
Enter the Logical Criteria

Modify your WHERE clause to group the vendor conditions and append the inspection check: WHERE (((OrderedV1=True) AND (DeliveredV1=True)) OR ((OrderedV2=True) AND (DeliveredV2=True))) AND (Inspected=False).

4
Alternative: Use the Design Grid

If using the visual Design Grid, place Vendor 1's True criteria on the 'Criteria' row, place Vendor 2's True criteria on the 'Or' row below it, and ensure Inspected=False is entered on both rows.

5
Run and Verify

Click 'Run' on the Ribbon to execute the query. Verify that the consolidated report correctly filters projects based on both vendors' statuses.

Use Boolean Logic with Proper Parentheses
Parentheses Placement: Confirm the parentheses so the final Inspected=False condition strictly applies to both vendor branches. An error here will cause inspected items to mistakenly appear.
Free Microsoft Office alternative

Use WPS Office for Your Data Analysis and Reporting Needs

While Microsoft Access manages relational databases, WPS Spreadsheet offers powerful data filtering, logical functions (AND/OR), and pivot tables for analyzing your exported database records. Enjoy a free, lightweight, and highly compatible alternative to Microsoft Office.

  1. 1. Download the Software: Visit the official WPS website and download the WPS Office suite.
  2. 2. Install WPS Office: Follow the installation wizard to set up the lightweight application on your device.
  3. 3. Analyze Exported Data: Open WPS Spreadsheet to import your Access database CSV exports and apply advanced logical filters effortlessly.
Highly compatible with Microsoft Excel (.xlsx, .csv) formats for exported reports.Built-in advanced logical functions (AND, OR, IF) for straightforward data filtering.Lightweight software with a familiar, easy-to-use interface.Completely free to use for everyday office tasks and data analysis.
microsoft office alternative - wps office

Frequently Asked Questions

Why do I need parentheses when combining AND and OR in Access?

Parentheses control the order of evaluation in SQL logic. Without them, Access evaluates AND conditions before OR conditions by default, which can lead to unintended groupings and inaccurate report results.

Can I use a VBA function to evaluate complex query criteria?

Yes, when multiple Boolean expressions must be evaluated, you can write a custom VBA function containing multiple If...End If blocks. You can then call this function directly from your query design grid to return True or False.

What is a repeating group in database design?

A repeating group occurs when multiple columns in a single table store the same type of data (e.g., Vendor1, Vendor2, Vendor3). This violates the First Normal Form (1NF) of database design, making queries unnecessarily complex and harder to scale.

How do I filter records based on multiple conditions in the Design Grid?

In the Query Design Grid, place criteria that must be true at the same time on the same 'Criteria' row (AND logic). Place alternative conditions on the 'Or' rows below. Ensure that overarching criteria, like 'Inspected=False', are repeated on every utilized row.