If Null

S

Scuda

Hi all, I did do a search but could not find answer to my question.

I have a combo box with 2 options, CLOSED or SUSPENDED. I have a query that
I use to show the current status of all cases. What I would like to do is
have it so if the CASE STATUS is Null, have the words OPEN show up.

Is this possible?

Thanks! Steph
 
S

Scuda

Hi Dorian, thanks. I entered this:

SELECT IIF("CASE STATUS" IS NULL,'Open',"CASE STATUS") FROM tblSENESarLog

My text box is called CASE STATUS, but I am getting an error about subquery.

Any ideas?

Thanks again!
 
K

KARL DEWEY

I have a combo box with 2 options, CLOSED or SUSPENDED.
What is the name of the combo box? Is it bound to anything?
Is [CASE STATUS] the name of a field in your table? How is it related to
the combo box?

Post your SQL statement.
 
M

mscertified

Try:
SELECT IIF([CASE STATUS] IS NULL,'Open',[CASE STATUS]) FROM tblSENESarLog
this assumes [Case Status] is the name of your column.

-Dorian
 
S

Scuda

Thanks guys. This is what have right now:

SELECT tblSENESarLog.[SENE_CASE_#], tblSENESarLog.[Case Description],
tblSENESarLog.CONTROLLER
FROM tblSENESarLog
WHERE (((tblSENESarLog.[CASE STATUS]) Is Null))
ORDER BY tblSENESarLog.[SENE_CASE_#] DESC;


CASE STATUS is a name of a field in my table. The combo box is for a
display on one of my "main forms" It is basically a quick glance of what
cases are not Closed. It works great I just wanted it to say OPEN if that box
is still blank.

Thanks again!

KARL DEWEY said:
What is the name of the combo box? Is it bound to anything?
Is [CASE STATUS] the name of a field in your table? How is it related to
the combo box?

Post your SQL statement.
--
KARL DEWEY
Build a little - Test a little


Scuda said:
Hi all, I did do a search but could not find answer to my question.

I have a combo box with 2 options, CLOSED or SUSPENDED. I have a query that
I use to show the current status of all cases. What I would like to do is
have it so if the CASE STATUS is Null, have the words OPEN show up.

Is this possible?

Thanks! Steph
 
K

KARL DEWEY

Try this ---
SELECT tblSENESarLog.[SENE_CASE_#], tblSENESarLog.[Case Description],
tblSENESarLog.CONTROLLER, IIF(tblSENESarLog.[CASE STATUS] Is Null, "Open",
tblSENESarLog.[CASE STATUS])
FROM tblSENESarLog
ORDER BY tblSENESarLog.[SENE_CASE_#] DESC;

--
KARL DEWEY
Build a little - Test a little


Scuda said:
Thanks guys. This is what have right now:

SELECT tblSENESarLog.[SENE_CASE_#], tblSENESarLog.[Case Description],
tblSENESarLog.CONTROLLER
FROM tblSENESarLog
WHERE (((tblSENESarLog.[CASE STATUS]) Is Null))
ORDER BY tblSENESarLog.[SENE_CASE_#] DESC;


CASE STATUS is a name of a field in my table. The combo box is for a
display on one of my "main forms" It is basically a quick glance of what
cases are not Closed. It works great I just wanted it to say OPEN if that box
is still blank.

Thanks again!

KARL DEWEY said:
I have a combo box with 2 options, CLOSED or SUSPENDED.
What is the name of the combo box? Is it bound to anything?
I have a query that I use to show the current status of all cases. What I would like to do is have it so if the CASE STATUS is Null, have the words OPEN show up.
Is [CASE STATUS] the name of a field in your table? How is it related to
the combo box?

Post your SQL statement.
--
KARL DEWEY
Build a little - Test a little


Scuda said:
Hi all, I did do a search but could not find answer to my question.

I have a combo box with 2 options, CLOSED or SUSPENDED. I have a query that
I use to show the current status of all cases. What I would like to do is
have it so if the CASE STATUS is Null, have the words OPEN show up.

Is this possible?

Thanks! Steph
 
Top