IIF STATEMENT

A

Ashley

HELP,

What is wrong with this code?

=IIf([OPEN_QTY]<=0,Null,[NEED_DOCK])

OPEN_QTY IS A NUMBER.
NEED_DOCK IS A DATE.

Thanks
Ashley
 
F

Fons Ponsioen

Hi Ashley.
In itself it appears okay, however it depends where it is
used. What is the issue you are trying to resolve?
Fons
 
F

fredg

=IIf([OPEN_QTY]<=0,Null,[NEED_DOCK])

It would be easier to answer if you had posted what problem you are
having with it!!!
Make sure the name of the control is not the same as the name of a
field used in it's control source expression.
 
A

ASHLEY

For records that OPEN_QTY >0, they have "#error" instead
of NEED_DOCK date. Why?
For records <=0, they are working; they have null value.
 
F

Fons Ponsioen

Ashley. Check to make sure the name of the textbox is
some thing other than "NEED_DOCK" or any other name from
the fields in your query or table.
If the name of the textbox is the same as a field than
Access becomes confused.
Hope this helps.
Fons
-----Original Message-----
For records that OPEN_QTY >0, they have "#error" instead
of NEED_DOCK date. Why?
For records <=0, they are working; they have null value.
-----Original Message-----
HELP,

What is wrong with this code?

=IIf([OPEN_QTY]<=0,Null,[NEED_DOCK])

OPEN_QTY IS A NUMBER.
NEED_DOCK IS A DATE.

Thanks
Ashley
.
.
 
Top