Using * in condition of IIF statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possbile to use an * in the conditions of an IF statement ex:

Name: IIF([Name]=*ADP*,"1st","2nd"

What we want to do is find all names with ADP somewhere in the name and then
return the true statement. How can this be done?

Thanks
 
Patricia said:
Is it possbile to use an * in the conditions of an IF statement ex:

Name: IIF([Name]=*ADP*,"1st","2nd"

What we want to do is find all names with ADP somewhere in the name and then
return the true statement.


You need to use the Like operator when you want to use a
wildcard comparison:

Name: IIf([Name] Like "*ADP*", "1st", "2nd")
 
Back
Top