Kamis, 30 Oktober 2014

Re: [MS_AccessPros] IIF evaluating part of a text phrase

 

Jeff:


I tried your suggestion and it worked.

Thanks a lot.
Karen


---In MS_Access_Professionals@yahoogroups.com, <jpjones23@...> wrote :

Karen,

 

Why not try IIF(instr(LOB, "FHN") > 0, ....)

 

Jeff


From: "k2j1203@... [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: "MS Access Professionals" <MS_Access_Professionals@yahoogroups.com>
Sent: Thursday, October 30, 2014 12:44:05 PM
Subject: [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




--
---

Jeffrey Park Jones
Excel, Access, Word, Office Expert
Excel and Access, LLC®
http://ExcelAndAccess.Com

919-671-9870
5109 Deer Lake Trail
Wake Forest, NC 27587
jpjones23@...


__._,_.___

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

.

__,_._,___

Tidak ada komentar:

Posting Komentar