Others

How to Count Access Records Using Multiple Criteria in a Report

Tauseeq MagsiTauseeq Magsi Nov 2, 2026 868 views

Question details

The user needs to count specific records in a Microsoft Access report based on multiple field criteria, such as filtering by both Contact Type and Contact Method.

How to Count Access Records Using Multiple Criteria in a Report
Product
Microsoft Access
Device & OS
not provided
Scenario
Building an Access report to summarize data where totals need to reflect records matching two or more specific conditions.
Observed behavior
The user wants to display accurate conditional counts (e.g., Contact Type is 'Testing' and Contact Method is 'Telephone') within a single report footer or grouped section.
Before you start

Verify that the fields you intend to evaluate (e.g., Contact Type and Contact Method) are included in the underlying record source query of your report.

Solution 1Recommended

Use an Aggregate IIf Expression in the Report Footer

Combine the Sum function with an IIf statement to calculate totals for specific conditions directly in your report.

This method allows you to evaluate multiple criteria within a single text box control on your report without altering the underlying query.

1
Open Report in Design View

Right-click your report in the Access Navigation Pane and select 'Design View'.

2
Add a Text Box

Select the 'Text Box' tool from the Controls group on the Report Design Tools ribbon, then click inside the Report Footer or Group Footer to place it.

3
Access the Property Sheet

Select the newly added text box, open the Property Sheet (F4), and click on the 'Data' tab.

4
Enter the Aggregate Formula

In the Control Source property, enter the expression: =Sum(IIf([Contact Type]='Testing' And [Contact Method]='Telephone', 1, 0)).

5
Verify the Results

Switch back to 'Report View' to confirm that the text box accurately counts only the records that match both criteria.

Expression Tip: Using the Sum function with a 1/0 IIf statement is widely considered cleaner and less error-prone than trying to force the Count function to ignore non-matching records.
Free Microsoft Office alternative

Analyze and Count Multi-Criteria Data Easily with WPS Office

While Microsoft Access handles relational databases well, summarizing and counting data with multiple criteria is often much faster using PivotTables in a spreadsheet. WPS Office provides a lightweight, highly compatible, and free alternative to Microsoft Office, making complex data analysis accessible without the need to write SQL or complex expression formulas.

Fully compatible with Microsoft Excel formats (.xlsx, .csv) for seamless data importing.Create intuitive PivotTables to count and cross-tabulate multi-criteria data in seconds.Lightweight software package that consumes significantly fewer system resources.Free to use with a clean, familiar interface that eliminates a steep learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use multiple criteria in an Access DCount function?

Yes, you can use the DCount function with a compound criteria string. For example, =DCount("*", "YourTable", "[Contact Type]='Testing' AND [Contact Method]='Telephone'"). This is particularly useful if the fields are not part of the report's main record source.

What is the difference between Sum(IIf()) and Count(IIf()) in Access reports?

The expression =Sum(IIf(condition, 1, 0)) adds up the value '1' every time the condition is true. The expression =Count(IIf(condition, 1, Null)) counts the instances that are not Null. Both achieve the exact same numerical count for your specified criteria.

Why does my text box show '#Error' when calculating the count?

This typically happens if the Name property of your calculation text box is identical to the name of a field in your record source. To fix this, open the Property Sheet, go to the Other tab, and change the Name of the text box to something unique like 'txtTestingTelephoneCount'.