dt = sum(iif(deptgroup =1, iif(datereceived between sd and ed, downtime, 0), 0))
Just follow the logic.
if the deptgroup field is = 1, then evaluate the next statement: If daterecieved is between sd and ed, then we'll be summing the downtime field, if either condition fails, it will be counted as 0
Hey, that was very good Teddy...the way you gave an example, but then actually explained what it meant. That's the way I think others should be helped so that later on they know what they are actually doing.
hats off to ya...keep up the good work