If logic

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

i currently have this in a report
=Sum(IIf([SETH] In (1,2,3,6,7,8,9,10,11,12)1,0)

i want to count another field in my report how would i do
that would this be correct
=Sum(IIf([SETH] In (1,2,3,6,7,8,9,10,11,12) or [SETHE]
=2,1,0)
 
well, did you try it? and did it work as you expected?
one point: you're not really summing fields, you're summing *records*. your
second If statement will assign the value of 1 to each record where field
[SETH] is one of the listed values OR where field [SETHE] = 2. if BOTH
equations are false, then the value assigned to the record is 0. is that
what you're aiming for?

hth
 
Back
Top