Formular on form not Working. Help!

A

Ayo

I have 3 txetboxes with formulars in them
txtExtendedPrice: "=Qty*UnitPrice"
txtATTExtendedPrice: "=Qty*ATTUnitPrice"
txtFundingVariance: "=txtATTExtendedPrice-txtExtendedPrice"

txtFundingVariance only works when there are values in txtExtendedPrice and
xtATTExtendedPrice, otherwise, it doesn't show any thing at all. For
instance, if txtExtendedPrice=$2300 and txtATTExtendedPrice=nothing then
xtFundingVariance=nothing instead of ($2300).

Is there something I am doing wrong? Any help will be greatly appreciated.
Thanks.
 
J

Jeanette Cunningham

Ayo,
this is the Null thing.
Access won't give you an answer to the question what is the sum of a value
when added to an unknown.
if txtATTExtendedPrice = nothing, as far as Access is concerned the value of
txtATTEntendedPrice is unknown.

Instead use txtFundingVariance = Nz(txtExtendedPrice, 0) +
Nz(txtATTTExtendedPrice, 0)

Jeanette Cunningham
 
A

Ayo

Thanks a lot Jeanette.

Jeanette Cunningham said:
Ayo,
this is the Null thing.
Access won't give you an answer to the question what is the sum of a value
when added to an unknown.
if txtATTExtendedPrice = nothing, as far as Access is concerned the value of
txtATTEntendedPrice is unknown.

Instead use txtFundingVariance = Nz(txtExtendedPrice, 0) +
Nz(txtATTTExtendedPrice, 0)

Jeanette Cunningham
 
Top