Returns the number of cells in a specified column of a specified table that match the specified condition.
Dcount([Table], [Column], [Condition])
Where:
Table is the table within which the cells are to be counted.
Column is the column number within the table which the cells are to be counted.
Criteria is the search condition that when matched will count the cells in the column.
Rule | Meaning |
---|---|
Dcount(PeopleTable,4,"=Male") | Counts the number of cells in the fourth column of the people table that equal Male. |
Dcount(PeopleTable,2,"<>"""") | Counts the number of cells in the second column of the people table that does not equal blank (""). |
Dcount(PeopleTable,3,">30") | Counts the number of cells in the third column of the people table where the value is greater than 30 |
Table | Column | Criteria | Result of the Dcount function |
---|---|---|---|
PeopleTable | 4 | "=Male" | 3 |
PeopleTable | 3 | "<50" | 4 |
PeopleTable
Member ID | Name | Age | Gender |
---|---|---|---|
42 | Dave Sharp | 25 | Male |
44 | Joe Bloggs | 37 | Male |
96 | Sandra Shield | 42 | Female |
107 | Thomas Knight | 21 | Male |
251 | Isabelle Jones | 56 | Female |