Showing posts with label neest. Show all posts
Showing posts with label neest. Show all posts

Friday, February 10, 2012

cant get this boolean to work!

Hi,

I'm trying to do a very simple query and one of the fields neest to be changed to "open" or "closed" if it starts with 'P'.

So I am writing this expression:

list: if(DwgType.Table = 'p*',"Open","Closed")

its returning an "undifined function "if" in expression" error.

I'm sure this is something really silly, but could someone give me a hand please?

ThanksOriginally posted by YevSnow
list: if(DwgType.Table = 'p*',"Open","Closed")

This is SQL?|||It smells like MS-Access (or more accurately, VBA) to me.

-PatP|||Hello YevSnow,
I dont know which tool you are using but i think you should try the following

ORIGINAL CODE:
list: if(DwgType.Table = 'p*',"Open","Closed")

CHANGED CODE: TRY 1

list: if(DwgType.Table LIKE 'p%',"Open","Closed")

I would like to know which tools do you use?
if this is Excel then i think the above code should work.
otherwise tell us the tools try and ask for our help.|||It's access yea, ops did i post on the wrong forum?

I tried the % it likes it even less. It seems to be a problem with the synthax... I'll repost this on the access vba forum.

Thanks everyone!|||For MS-Access you want iif() instead of if(). I guess somebody had keyboard-stutter... Actually, they wanted to distinguish between a VBA IF statement and the "Immediate If" function, but that was a VERY long time ago!

-PatP