Expression Builder

  • Thread starter Thread starter Benay
  • Start date Start date
B

Benay

I have built numerous queries with a last column having
an expression to calculate the total of the results of
the fields. Now, it won't work. The column with the
expression just comes up blank. I'm doing it the same
way I always have but it just doesn't work.

Help.
 
A guess. One of the fields that you are trying to add has a null value. If
that is the case then the addition will return null. You can get around this by
using an IIF clause or the NZ function. Try something like:

NZ(FieldA,0) + Nz(FieldB,0) + Nz(FieldC,0)

OR
IIF(FieldA is Null,0,FieldA) + IIF(FieldB is Null,0,FieldB) + ...
 
I have a rudimentary working knowledge of Access, so your
suggestion is beyond me; however, I will go back and play
with it to try to figure it out. You are correct in that
several of the fields have null values. Thank you for
your help. If you think of anything that might make this
any easier for me, please let me know. Again, thank you
for your assistance.
 
Back
Top