Solved

IIf Question

Posted on 2013-05-30
2
394 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
Comment Utility
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
Comment Utility
This did it:

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

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

17 Experts available now in Live!

Get 1:1 Help Now