calculating with Null fields

  • Thread starter Jean-Paul De Winter
  • Start date
J

Jean-Paul De Winter

Hi,
I have a table with some fields defined as Numeric with default value 0
I want to do some calculating with some of this fields but noticed that
when nothing is entered in those fields they are "Null-field" so no
calculating is possible...

how to solve this?

Thanks
 
S

Stefan Hoffmann

hi Jean-Paul,

Jean-Paul De Winter said:
I have a table with some fields defined as Numeric with default value 0
I want to do some calculating with some of this fields but noticed that
when nothing is entered in those fields they are "Null-field" so no
calculating is possible...
how to solve this?

a) set the Required property of the field definition to True.

b) use the Nz() function to replace NULL,
e.g. Nz(Field1, 0) / Nz(Field2, 1)



mfG
--> stefan <--
 
J

Jean-Paul De Winter

Thanks for the reply..

"required property" does that mean an value MUST be entered even if
tehre is nothing to enter (most field values are looked up in other
tables...

I looked for the Nz() function in my (dutch) version of access but
couldn't find it...
Could you please explain what the ,0 or ,1 mean???
Thanks again



Stefan Hoffmann schreef:
 
S

Stefan Hoffmann

hi Jean-Paul,

Jean-Paul De Winter said:
"required property" does that mean an value MUST be entered even if
tehre is nothing to enter (most field values are looked up in other
tables... Yes.

I looked for the Nz() function in my (dutch) version of access but
couldn't find it...
Could you please explain what the ,0 or ,1 mean???
http://www.techonthenet.com/access/functions/advanced/nz.php

These are the values to use, if the specifed field is NULL.

mfG
--> stefan <--
 
Top