View Full Version : Help with Calculating


Shashant
01-06-2006, 12:06 PM
This may be a simple question:

I am trying to get a Net Balance of Charges and Payments.
There are two types of Charges, Course Charges and Non-Course Charges.

When I try to write a computation to Get the Net Balance:
=([Payments]-([CourseCharges]-[NonCourseCharges]))

It works fine for those records with all those fields with data, but I have an instance where one of my records doesn't have a NonCourseCharge, so all I get is Blank for NetBalance.

Is there a way to conditionalize so if there is no record it will use zero?

Rich
01-06-2006, 12:16 PM
Look up the Nz function

llkhoutx
01-08-2006, 12:23 PM
=(nz([Payments],0)-(nz([CourseCharges],0)-nz([NonCourseCharges],0)))

Otherwise, as you've discovered, any empty or null field cause the expression njot to calculate.

Shashant
01-09-2006, 07:39 AM
Thank you so much, it worked perfectly.