Null "" or "0"

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..
 
A

Adrian Jansen

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
 
S

Steinarr G.

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..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top