tacieslik
03-20-2003, 02:22 AM
Hello,
I have a select query with the following fields and sample data in:
The CRANE feild only ever contains "A" or "B".
CRANE - CELLSTATUS
---------------------------
A - EMPTY
A - STORED
B - STORED
B - HOLD
A - EMPTY
B - STORED
A - STORED
I have a form that uses the following DCount function:
=DCount("*","qryAllData","CRANE ='A'")
This will count all the records with the value of "A", but I want it to be a bit smarter. I want to know the number of records that have "A" in the CRANE field if the value in the CELLSTATUS field is "STORED". I spent ages looking on the forum for similar examples, but they are a bit different & I've tried to adapt them without success. I guess I can use an IF function somehow?
Any help would be much appreciated.
TIA
I have a select query with the following fields and sample data in:
The CRANE feild only ever contains "A" or "B".
CRANE - CELLSTATUS
---------------------------
A - EMPTY
A - STORED
B - STORED
B - HOLD
A - EMPTY
B - STORED
A - STORED
I have a form that uses the following DCount function:
=DCount("*","qryAllData","CRANE ='A'")
This will count all the records with the value of "A", but I want it to be a bit smarter. I want to know the number of records that have "A" in the CRANE field if the value in the CELLSTATUS field is "STORED". I spent ages looking on the forum for similar examples, but they are a bit different & I've tried to adapt them without success. I guess I can use an IF function somehow?
Any help would be much appreciated.
TIA