I have a calculated field in a query that provides the names for task lists and the number of tasks in each list within parentheses;
NameCount: [TaskListName] & " (" & DCount("*","tblTasks","[TaskListID]=" & [TaskListID]) & ")"
This works nicely and provides;
ListName1 (2)
ListName2 (10)
etc. etc.
The problem is it's counting completed tasks so I am trying to add a second criteria to the DCount in order for it to count uncompleted tasks only.
I have tried several variations of the expression below but don't get the required results.
Independently the criteria work fine but together, not so.
Full Expression;
NameCount: [TaskListName] & " (" & DCount("*","tblTasks","[CompletionDate] Is Null" And "[TaskListID]=" & [TaskListID]) & ")"
DCount only
DCount("*","tblTasks","[CompletionDate] Is Null" And "[TaskListID]=" & [TaskListID])
Any help much appreciated.
NameCount: [TaskListName] & " (" & DCount("*","tblTasks","[TaskListID]=" & [TaskListID]) & ")"
This works nicely and provides;
ListName1 (2)
ListName2 (10)
etc. etc.
The problem is it's counting completed tasks so I am trying to add a second criteria to the DCount in order for it to count uncompleted tasks only.
I have tried several variations of the expression below but don't get the required results.
Independently the criteria work fine but together, not so.
Full Expression;
NameCount: [TaskListName] & " (" & DCount("*","tblTasks","[CompletionDate] Is Null" And "[TaskListID]=" & [TaskListID]) & ")"
DCount only
DCount("*","tblTasks","[CompletionDate] Is Null" And "[TaskListID]=" & [TaskListID])
Any help much appreciated.