Adding

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

I have 5 numbers that I need to total V1,V2,V3,V4,VOT.
Sometimes VOT is Null. If I leave VOT blank, Total does
not work. If I put a number in VOT it works. What can I
do to fix this problem.

Frank
 
Frank,
assuming this is an expression in a query, Try the following:
Expr1: Nz([V1],0)+Nz([V2])+Nz([V3],0)+Nz([V4],0)+Nz([VOT],0)

The Nz function replaces a null value in any of the fields with a number, in
this case 0. This allows access to complete the equation.

Hope this helps.
 
Frank said:
I have 5 numbers that I need to total V1,V2,V3,V4,VOT.
Sometimes VOT is Null. If I leave VOT blank, Total does
not work. If I put a number in VOT it works. What can I
do to fix this problem.

Most operators applied to Null return Null as a result, so 27 + Null = Null.
You can use the Nz function to replace a Null value with 0:

=Nz(V1, 0)+Nz(V2, 0)+Nz(V3, 0)+Nz(V4, 0)+Nz(VOT, 0)
 

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

Back
Top