I need to write a query statement that counts people not within a certain number value. The column that I am using could have 4 values: The field is empty; the field has a number between 37 & 39; the field could have a number not between 37 & 39; or the field could have UTD. I thought I could use an iff statement that would ask if the value was > =37 & <=39. Then if this was true give them a 0 value if false give a 1 value. That way I could count the ones and obtain the number of exclusions. Since there would be null values I thought I could use the Nz function to give the empty fields a 0 value and then they wouldn’t affect the count. However, I need to count the UTDs I thought the statement would generally be something like this:
Excluded by gest: Iff(Nz(between [37] AND [39]),0,1),0))
I was thinking this could go in the field row of the QBE and expression would be in the total row.
But what would I do with the UTDs? Could I assign UTD a zero value and then query the column a second time for UTD only? How would I write that? I’m way beyond my SQL writing and syntax ability and wonder if I need a vbs?