Null "" or "0"

  • Thread starter Thread starter Steinarr G.
  • Start date Start date
S

Steinarr G.

Example:

=[form1]+[form2]

I nead to have the result 0 if there is nothing in there..
the formats are currency and default value 0

Now the result is "" not 0 .. becouse the there is´nt anything in form1
and form2 ..

But i still nead a result there.. as a default value of 0 even tho there
is´nt anything in there.

any tips.. ???


Thanks
Steinarr..
 
Look up the Nz function, to return a zero for a null input:

result = Nz([form1]) + Nz([form2])

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
That did it. ;)

nice nice,,
thanks.

Steinarr.


Fredg said:
Look up the Nz() function in Access Help.
=Nz([Form1],0) + Nz([Form2],0)

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Steinarr G. said:
Example:

=[form1]+[form2]

I nead to have the result 0 if there is nothing in there..
the formats are currency and default value 0

Now the result is "" not 0 .. becouse the there is´nt anything in form1
and form2 ..

But i still nead a result there.. as a default value of 0 even tho there
is´nt anything in there.

any tips.. ???


Thanks
Steinarr..
 
Back
Top