Solved

IIf Question

Posted on 2013-05-30
2
407 Views
Last Modified: 2013-05-30
Am using query designer and have an IIf issue.

Here is my statement:

MoldingSection: IIf([Pattern_Type]="Airset" & "*","Airset",[Pattern_Type])

Now to explain...  sometimes the [PatternType] field is "Airset Line", or "Airset Floor" or maybe just "Airset"  But in this field I want the result to be just "Airset" (dropping the 2nd word).  But in some cases the result may be "Floor" or "SPO" in which case I want the real result to display.

I suspect that the "Airset" & "*" part of my code is at fault but I can't figure out what it should be.
0
Comment
Question by:SteveL13
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 39209099
MoldingSection: IIf(Instr([Pattern_Type],"Airset")>0,"Airset",[Pattern_Type])

or


MoldingSection: IIf([Pattern_Type] Like "Airset" & "*","Airset",[Pattern_Type])
0
 

Author Comment

by:SteveL13
ID: 39209164
This did it:

MoldingSection: IIf([Pattern_Type] Like "Airset" & "*","Airset",[Pattern_Type])
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now