help with expression please

  • Thread starter Thread starter Cheryl Larson
  • Start date Start date
C

Cheryl Larson

Hello. Writing an expression on a field in a report and I need to look
for three (as an example) distinct values in this field. If any of the
three values are there, return "NA" on the report. Otherwise, return
the actual field contents. This is what I have in the Control Source
for the field in my report:

=IIf([Current Indicators.LIST.Index]="PHY1","NA",[Current Indicators.SIP
Compliance])

This works perfectly for ONE value. How do I get this working for more
than one value (like "PHY1" "PHY2" and "PHY3"? Thank you.
 
try

=IIf([Current Indicators.LIST.Index]="PHY1" Or [Current
Indicators.LIST.Index]="PHY2" Or [Current
Indicators.LIST.Index]="PHY3","NA",[Current Indicators.SIP Compliance])

or

=IIf([Current Indicators.LIST.Index] In ("PHY1","PHY2","PHY3"),"NA",[Current
Indicators.SIP Compliance])

i'm not sure if *In* will work in this expression, though.

hth
 
"In" worked beautifully. Thank you so much for your help!
try

=IIf([Current Indicators.LIST.Index]="PHY1" Or [Current
Indicators.LIST.Index]="PHY2" Or [Current
Indicators.LIST.Index]="PHY3","NA",[Current Indicators.SIP Compliance])

or

=IIf([Current Indicators.LIST.Index] In ("PHY1","PHY2","PHY3"),"NA",[Current
Indicators.SIP Compliance])

i'm not sure if *In* will work in this expression, though.

hth


Hello. Writing an expression on a field in a report and I need to look
for three (as an example) distinct values in this field. If any of the
three values are there, return "NA" on the report. Otherwise, return
the actual field contents. This is what I have in the Control Source
for the field in my report:

=IIf([Current Indicators.LIST.Index]="PHY1","NA",[Current Indicators.SIP
Compliance])

This works perfectly for ONE value. How do I get this working for more
than one value (like "PHY1" "PHY2" and "PHY3"? Thank you.
 
Back
Top