iif function

T

Todd

The query below works great. It returns the null values in the status field
as "Pending" and the other statuses as entered in the field. I am also
trying to have the statuses "needs review" and "want order number" return as
"Pending". I have built a little and tested a little but to no avail. What
would I do in this statement to have the "null values", "needs review", and
'want order number" statuses returned as "Pending".


Current Status: Left(IIf(IsNull([status]),"Pending",[Status]),12)
 
K

KARL DEWEY

Try this --
Current Status: Left(IIf([status] Is Null OR [status] ="needs review" OR
[status] = "want order number","Pending",[Status]),12)
 
T

Todd

Darnit Karl,
I tried every which way I could think of to put the statement together using
like/and/or etc. The way you wrote it is was absolutely perfect. Are there
any good reference manuals for all the functions and what they do? Something
with tons of different possible builds would be great. Thanks for your
expert help and have a great day.

KARL DEWEY said:
Try this --
Current Status: Left(IIf([status] Is Null OR [status] ="needs review" OR
[status] = "want order number","Pending",[Status]),12)
--
KARL DEWEY
Build a little - Test a little


Todd said:
The query below works great. It returns the null values in the status field
as "Pending" and the other statuses as entered in the field. I am also
trying to have the statuses "needs review" and "want order number" return as
"Pending". I have built a little and tested a little but to no avail. What
would I do in this statement to have the "null values", "needs review", and
'want order number" statuses returned as "Pending".


Current Status: Left(IIf(IsNull([status]),"Pending",[Status]),12)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top