I have a querry in Access and I need an expresion that needs to find a group
of words in another field and return yes if it finds it and return blank if
it doen't find it. I have the following expression in which:
ADDED WORKLIFE REWARDS MEMBER: is the field name in the querry
Call_Comments is the field where it needs to search
ADDED WORKLIFE REWARDS MEMBER is the sentence that needs to search
"YES" is the outcome if it finds the sentence
" " is the outcome if it doen't find the sentence
This is the expresion that I have but since the Call_Comments field contains
more sentences all return to blank:
ADDED WORKLIFE REWARDS MEMBER: IIf([Call_Comments]="ADDED WORKLIFE REWARDS
MEMBER","YES"," ")
John Spencer - 12 Sep 2006 17:10 GMT
Try using Instr or Like in the IIF. My preference is to use LIKE in a
query.
ADDED WORKLIFE REWARDS MEMBER:
IIf([Call_Comments] Like "*ADDED WORKLIFE REWARDS MEMBER*","YES"," ")
OR
ADDED WORKLIFE REWARDS MEMBER:
IIf(Instr(1,[Call_Comments],"ADDED WORKLIFE REWARDS MEMBER",3)> 0,"YES","
")
>I have a querry in Access and I need an expresion that needs to find a
>group
[quoted text clipped - 14 lines]
> ADDED WORKLIFE REWARDS MEMBER: IIf([Call_Comments]="ADDED WORKLIFE REWARDS
> MEMBER","YES"," ")
Alexandra504 - 12 Sep 2006 17:25 GMT
Thanks ... both expresions worked
> Try using Instr or Like in the IIF. My preference is to use LIKE in a
> query.
[quoted text clipped - 26 lines]
> > ADDED WORKLIFE REWARDS MEMBER: IIf([Call_Comments]="ADDED WORKLIFE REWARDS
> > MEMBER","YES"," ")
Klatuu - 12 Sep 2006 17:12 GMT
ADDED WORKLIFE REWARDS MEMBER: IIf(Instr([Call_Comments], "ADDED WORKLIFE
REWARDS
MEMBER") <> 0,"YES"," ")
> I have a querry in Access and I need an expresion that needs to find a group
> of words in another field and return yes if it finds it and return blank if
[quoted text clipped - 11 lines]
> ADDED WORKLIFE REWARDS MEMBER: IIf([Call_Comments]="ADDED WORKLIFE REWARDS
> MEMBER","YES"," ")
Alexandra504 - 12 Sep 2006 17:20 GMT
It worked. Thank you so much
> ADDED WORKLIFE REWARDS MEMBER: IIf(Instr([Call_Comments], "ADDED WORKLIFE
> REWARDS
[quoted text clipped - 15 lines]
> > ADDED WORKLIFE REWARDS MEMBER: IIf([Call_Comments]="ADDED WORKLIFE REWARDS
> > MEMBER","YES"," ")