A
Angela
I have a query in which one date need to be filtered based on another field.
If the field [last] =1 , the data needs to be filtered showing only data
where [ShiftDate]>=[Start1]. If the field [last]=2, it is
[shiftdate]>=[Start2]. So in the criteria for field [ShiftDate], I entered
"iif([last]=1,[shiftdate]>=[start1],[shiftdate]>=[start2])". I don't get an
error, but I also don't get any results. If I enter ">=[start1]" or
[shiftdate]>=[start1] instead of the iif statement, I get the results
expected. I'm pretty sure that I've used iif statements in criteria before,
but clearly there's something wrong with this one. Can anyone help?
If the field [last] =1 , the data needs to be filtered showing only data
where [ShiftDate]>=[Start1]. If the field [last]=2, it is
[shiftdate]>=[Start2]. So in the criteria for field [ShiftDate], I entered
"iif([last]=1,[shiftdate]>=[start1],[shiftdate]>=[start2])". I don't get an
error, but I also don't get any results. If I enter ">=[start1]" or
[shiftdate]>=[start1] instead of the iif statement, I get the results
expected. I'm pretty sure that I've used iif statements in criteria before,
but clearly there's something wrong with this one. Can anyone help?