Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

IIf Question

Posted on 2013-05-30
2
Medium Priority
?
468 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

782 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