Why is my Total Costs empty??

krayziehustler

New member
Local time
Today, 11:33
Joined
Aug 9, 2007
Messages
7
i have a query that calculates Total Costs as (total fixed + total variable). total fixed is ( fixed hours * fixed rate) and total variable is (var hours * var rate) as expected....


but one of my records only has Var hours and a Var rate,therefore calculates total variable fine, but since this certain product doesnt have any fixed cost my TOTAL COSTS record for that product is left BLANK??????

if there is no fixed cost than the total cost should just equal total variable....


when you enter a fixed cost and rate it works as expected though...any idead please i am on a deadline, im pretty sure VBA is the easiest way to go but i dont know how to go about it, this query is the heart of the whole Application, it is used primarily as the source for a few reports so this throws off my totals
 
Last edited:
If you don't have a value for fixed cost it may be coming in as a null and making your formula invalid.

Try using NZ function on the fixed costs.
 
If you don't have a value for fixed cost it may be coming in as a null and making your formula invalid.

Try using NZ function on the fixed costs.

what is NZ function?????

you're right it probably is comming in as null, i need it to still calcualate which makes sense cuz you can't calculate a NULL
 
You could look up NZ in Access help!

Actually, it the Null to Zero function.
 
haha,you are the freakin man!!!


all i had to do was put nz([fixed costs]) + [total variable]....thanks a bunch
 
I'd go for belt and braces. Wrap all of your individual fields in the equation with Nz() just to be sure.
 

Users who are viewing this thread

Back
Top Bottom