Help with Iif statement in a query

ds0203

Registered User.
Local time
Today, 08:05
Joined
Feb 22, 2007
Messages
14
Hi all,

I'm trying to perform a query in which if the pump_type begins with the word "none" then I want it to populate exactly what is in the pump_type field. If that field contains anything else, I want it to say "dedicated-" and then what is in the pump_type field.

What do I have wrong with my iif statement below? It keeps populating "dedicated-" and the pump_type field for all of the records - even those that have none in them.


Pump_Type_NEW: IIf([pump_type]="none*",[pump_type],"Dedicated-" & [pump_type])

thanks!
ds
 
In order to use a wildcard, you need to use Like instead of =.
 
Thanks, that worked great!
 

Users who are viewing this thread

Back
Top Bottom