Addition is not working in query

jeo

Registered User.
Local time
Today, 08:47
Joined
Dec 26, 2002
Messages
299
I’ve created this total field in my query to add up 3 amounts. I’m not sure what I’m doing wrong, but when I add values into added fields, Total field doesn’t change value.
Total: ([Installment1Amnt])+([Installment2Amnt])+([Installment3Amnt])
Actually, it doesn't work if one of the amounts = null. All three of those fields are intialized as a Number field.
Any ideas?
Thanks.
 
Last edited:
Have you tried th nz() function?

Total: nz([Installment1Amnt])+nz([Installment2Amnt])+nz([Installment3Amnt])

???
kh
 
I didn't before.
Now that I treid it, it worked well.
What does this nz function do? I'm assuming it's "not zero".
Where can I learn more about functions like this?
I didn't even know that this function existed.
 
Last edited:
The Nz function lets you return a value when a variant is null
 
Thank you all for your assistance and explanations.
:p
 
I Access 02 VBA help you can find it. Actually, it's a little more robust than just return a zero if null...

kh
 
I will try and look it up to understand it a little better.
Thanks.
 
Nice

Ya that's a nice one to know...I've been using the IIF function and saying if field is null then make it 0 else use the field... what a pain compared to nz! Good to know.

Gary
 

Users who are viewing this thread

Back
Top Bottom