Hello
Having trouble <again>
I have columns like [Fruit], [Drink] etc
I have a query that runs that says for example this:
IIF([Fruit]="Apple",1,0)+IIF([Drink]="MTDew",1,0)
With other criteria I end up with
4 records that meet all my criteria and there is 1 record where Apple is present and one record where MTDew is present so I have two rows that return one field each a 1.
Now.. I want to count how many "items" there are. That is counting how many "1"s (How many Apple and how many MTDew) there are.
I know it is some kind of count function but everything I try returns 4 (because I have 4 records that meet my criteria) but I want it to return 2 because I only have 2 "Item"s.
I've tried the following which might be stupid but were the only things I could think of.
Count(IIF([Fruit]="Apple",1,0)+IIF([Drink]="MTDew",1,0)) - this returns 4
DCount(IIF([Fruit]="Apple",1,0)+IIF([Drink]="MTDew",1,0)) - this returns nothing because it gives me an error.
So any help would be greatly appreciated.
Thanks in advance
<clueless>
Having trouble <again>
I have columns like [Fruit], [Drink] etc
I have a query that runs that says for example this:
IIF([Fruit]="Apple",1,0)+IIF([Drink]="MTDew",1,0)
With other criteria I end up with
4 records that meet all my criteria and there is 1 record where Apple is present and one record where MTDew is present so I have two rows that return one field each a 1.
Now.. I want to count how many "items" there are. That is counting how many "1"s (How many Apple and how many MTDew) there are.
I know it is some kind of count function but everything I try returns 4 (because I have 4 records that meet my criteria) but I want it to return 2 because I only have 2 "Item"s.
I've tried the following which might be stupid but were the only things I could think of.
Count(IIF([Fruit]="Apple",1,0)+IIF([Drink]="MTDew",1,0)) - this returns 4
DCount(IIF([Fruit]="Apple",1,0)+IIF([Drink]="MTDew",1,0)) - this returns nothing because it gives me an error.
So any help would be greatly appreciated.
Thanks in advance
<clueless>