Null Value

  • Thread starter Thread starter glalmon
  • Start date Start date
G

glalmon

If you are creating a query, just type the IIF statement
in the query grid. If you are adding this expression
to another number in the query, it would look
like this in the query grid

Expr1: IIf(isNull([ChampOrRes]),0,[ChampOr Res]) + 5

This should not result in a null value

-----Original Message-----
I have a numeric field in a table named "ChampOrRes". I
want to add this field to another and I understand the
problem that it won't do this if the field is null (which
it is at times). I looked up in a book and was given the
follow IIf statement
IIf(isNull([ChampOrRes]),0,[ChampOr Res])
This seems logical to me but the
question I have is where to put this expression
There is also this statement
NZ(Null-to-zero)
Again I don't know where to put this
expression. I assume that for a numeric field the Null-To-
Zero should be changed to Null-To-0???
 
Or...
Expr1: Nz([ChampOrRes], 0)

You can change "Expr1" to be whatever name you like - just not "ChampOrRes".

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

If you are creating a query, just type the IIF statement
in the query grid. If you are adding this expression
to another number in the query, it would look
like this in the query grid

Expr1: IIf(isNull([ChampOrRes]),0,[ChampOr Res]) + 5

This should not result in a null value

-----Original Message-----
I have a numeric field in a table named "ChampOrRes". I
want to add this field to another and I understand the
problem that it won't do this if the field is null (which
it is at times). I looked up in a book and was given the
follow IIf statement
IIf(isNull([ChampOrRes]),0,[ChampOr Res])
This seems logical to me but the
question I have is where to put this expression
There is also this statement
NZ(Null-to-zero)
Again I don't know where to put this
expression. I assume that for a numeric field the Null-To-
Zero should be changed to Null-To-0???
Thanks in advance for your help
.
 
Back
Top