Check Whether All Subtasks Are Complete in Microsoft Access
Question details
Create a query that reports a parent task as complete when every related subtask has a completion date.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A database tracks parent tasks and related subtasks, each with a completion date.
- Observed behavior
- The query should show Not Complete when a related subtask has no completion date and Complete when none are unfinished.
Identify the parent task table, subtask table, linking fields, and completion date field. The example assumes a numeric TaskID in both tables and a Date/Time field named DateComplete in the subtask table.
Use DCount to find unfinished subtasks in an Access query
Count related subtasks with a null completion date and use that count to assign each parent task a status.
This example assumes the parent table is named ParentTasks and the child table is named Subtasks. Replace the table and field names with those in your database.
In Access, select Create > Query Design, then switch to SQL View.
Paste this SQL into SQL View: SELECT P.TaskID, IIf(DCount("*", "Subtasks", "TaskID = " & [P].[TaskID] & " AND DateComplete Is Null") > 0, "Not Complete", "Complete") AS TaskStatus FROM ParentTasks AS P;
Select Run and review TaskStatus for each TaskID. A task with at least one null DateComplete should show Not Complete; otherwise, it shows Complete.
Press Ctrl+S or select Save, enter a query name, and select OK.

Track task lists in WPS Office
WPS Office is a free, lightweight alternative for working with documents and spreadsheets. Its familiar interface and Microsoft Office format compatibility make it easy to move task lists into WPS, though it does not run Microsoft Access database queries.

Frequently Asked Questions
Why does a task with no subtasks show as complete?
DCount returns zero when there are no related records, so the example finds no unfinished subtasks. Add a separate DCount for all related subtasks if you want to display a different status when the count is zero.
What does Is Null check in the query?
The criterion DateComplete Is Null finds subtask records with no completion date. DCount counts those records for the current parent TaskID.
Can I use the query with different table and field names?
Yes. In SQL View, replace ParentTasks, Subtasks, TaskID, and DateComplete with the corresponding names in your database. The example assumes TaskID is numeric; text identifiers need different criteria formatting.
Does the query update the parent task record?
No. It displays a calculated TaskStatus in the query results. It does not write a status value to the parent table.




