Solved

IIf Question

Posted on 2013-05-30
2
444 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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…

734 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