Contains "IF" statement

Mudbutt

Board Regular
Joined
Jul 18, 2011
Messages
158
I'm not sure what I'm doing wrong, hopefully someone can help me. In this field i have there are a few different variations of the "Stinger" (i.e. Stinger-Wet, Stinger-Dry, etc.). I'm trying to create a formula in access that just combines them both under one name, "Stinger". Yet, it's not working and returning my value.

IIf([qryPaintActuals]![Line]="*Stinger*","Stinger",[qryPaintActuals]![Line])


This isn't working, it just returns the original ones instead of combing them to "Stinger".
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Change the = sign to LIKE (you're doing a wildcard comparison, not an exact match, and that matters to a database). So...

IIf([qryPaintActuals]![Line] LIKE "*Stinger*","Stinger",[qryPaintActuals]![Line])

Denis
 
Upvote 0

Forum statistics

Threads
1,215,833
Messages
6,127,157
Members
449,367
Latest member
w88mp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top