Karen,
Why not try IIF(instr(LOB, "FHN") > 0, ....)
Jeff
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@centurylink.net
Posted by: jpjones23@centurylink.net
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar