Hello again!
Welcome to my daily head scratcher.
I have a query that selects rows based on criteria then does some counting. The selecting and counting is fine as long as the criteria found some rows.
but if there are no rows selected instead of zero I get a blank cell.
here is an example:
I search my database for "Apple" in field [Fruit]
Then I do sum(IIF([Apple]="Red",1,0))
That counts Red Apples
But if there is no "Apple" instead of zero I get nothing.
How can I make it show a zero if there are either no rows or no Red Apples?
Thank you in advance!
Welcome to my daily head scratcher.
I have a query that selects rows based on criteria then does some counting. The selecting and counting is fine as long as the criteria found some rows.
but if there are no rows selected instead of zero I get a blank cell.
here is an example:
I search my database for "Apple" in field [Fruit]
Then I do sum(IIF([Apple]="Red",1,0))
That counts Red Apples
But if there is no "Apple" instead of zero I get nothing.
How can I make it show a zero if there are either no rows or no Red Apples?
Thank you in advance!