N
neeraj
I am using a statement creating a calculated field based on values in two
fields of a query, [Fld1] and [Life] as below:
New Field: IIf([Fld1]="Val1*","ABC",Switch([Life]>=0 And [Life]<=30,"<30
days",[Life]>30 And [Life]<=60,"31-60 days",[Life]>60 And [Life]<=90,"61-90
days",[Life]>90 And [Life]<=120," 91-120 days",[Life]>120,">=120 days"))
What I am trying to achieve is that "New Field" should assume the value
"ABC" if [Fld1] = Val1* regardless of the value in [Life]. What is happening
with the above statement is that for rows which have both [Fld1] = Val1* and
also meeting one of the conditions for [Life], the new field asumes the value
from the switch statement and not "ABC" as I would like it to. I would like
[Fld1] = Val1 to take precedence over the [Life] condition. How can I do it?
fields of a query, [Fld1] and [Life] as below:
New Field: IIf([Fld1]="Val1*","ABC",Switch([Life]>=0 And [Life]<=30,"<30
days",[Life]>30 And [Life]<=60,"31-60 days",[Life]>60 And [Life]<=90,"61-90
days",[Life]>90 And [Life]<=120," 91-120 days",[Life]>120,">=120 days"))
What I am trying to achieve is that "New Field" should assume the value
"ABC" if [Fld1] = Val1* regardless of the value in [Life]. What is happening
with the above statement is that for rows which have both [Fld1] = Val1* and
also meeting one of the conditions for [Life], the new field asumes the value
from the switch statement and not "ABC" as I would like it to. I would like
[Fld1] = Val1 to take precedence over the [Life] condition. How can I do it?