Kamis, 30 Oktober 2014

[MS_AccessPros] IIF evaluating part of a text phrase

 

Hello everyone.


I just have a quick question.  I feel like I should know the answer to this but I'm drawing a blank.  All that I want to do is use IIF to find a value and if true insert a text phrase.  Easy enough.  However, the twist.  I want to be able to evaluate a field value that contains my text as part of the field value.  In case I didn't explain my self correctly, here's an example.


The field [LOB} contains the value "FHN/ACA, ICP only".  I want to evaluate this information to see if "FHN" is a part of the value.  Then I want Access to return the value "FHN" if it is part of the text.  I've tried two different ways to write the function.


IIF([LOB] Like "*FHN*", "FHN")

IIF([LOB] = "*FHN*", "FHN")


They both come back as blank when I run them.  Can someone tell me what I'm doing wrong?  I seem to be having a "brain fart."


Thanks.

Karen

__._,_.___

Posted by: k2j1203@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Tidak ada komentar:

Posting Komentar