Query Returns Empty field when adding (1 Viewer)

kholm

Registered User.
Local time
Today, 19:09
Joined
Jun 25, 2001
Messages
63
When using a query to merge three fields and to come up with a sum i.e. IIF([A]=0,0,[A]++[C]), it return nothing. When I add B and C, I get the correct product, but add in that A, which usually is empty, I get an empty cell.
 

Sohaila Taravati

Registered User.
Local time
Today, 19:09
Joined
Oct 24, 2001
Messages
266
You have to make sure you have something in the field in order to add it up for you. To do that, do this in your query

IIf([A]is null, 0, [A])

What this dose is it looks at the field and if it is null puts a 0 there.

Sohaila ;)
 

kholm

Registered User.
Local time
Today, 19:09
Joined
Jun 25, 2001
Messages
63
It worked

I don't know why, but it worked. What are the Nz's for? Thank you
 

Jack Cowley

Registered User.
Local time
Today, 19:09
Joined
Aug 7, 2000
Messages
2,639
Search Help for the Nz() function (Null to Zero) for the details....
 

Users who are viewing this thread

Top Bottom