Adding Null value in Access Reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Access report linked to a Query Cross Tab.

There are 4 Columns.
SumOfDI = 10
SumOfDO = 2
SumOfAI = 3
SumOfAO = null

I'm trying to add these values in the report
=[SumOfDI]+[SumOfDO]+[SumOfAI]+[SumOfAO].
This returns a Null value.


However if I add =[SumOfDI]+[SumOfDO]+[SumOfAI] I get a value displayed.


The Null value is causing a problem is thus sum.




AI , AO , DI & DO all are defined as "Number" with a "0" default value.

Any ideas?
 
Try:
=Nz([SumOfDI],0)+Nz([SumOfDO],0)+Nz([SumOfAI],0)+Nz([SumOfAO],0)
You may also need to wrap the Nz() in Val(Nz(....))
 

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