No nulls, and I already use the NZ() function on all fields.
And the line should really be (as sum of each line):
=Nz([Price]+[GeneralTaxes])*Nz([Amount])*Nz(((1-[Discount])/100)*100)
and this works fine for the sum of each orderline
However, adding =Sum to it in the footer in a textbox suddenly just
stopped to work.
Could it be that I'm working on an access 2000 db in office xp, win xp
pro?
Because it just stopped to function!
Anyway, here's the calculation for a textbox in the footer of
frmOrderdetails:
=Sum(Nz(Price*Amount)) in the ControlSource property.
Botn fields are set correctly as moneyvalue and integer value and have
been working nicely until I loaded this access 2000 db into access xp.
Have a nice day!
But why it doesn't return any value I can't tell
cjb_kjb skrev:
Apart from some typos - like sm for sum and probably VTA for VAT....
Are any of the fields null (Price/Amount/Discount.....etc
If they are (or can be) then the nz function looks in the wrong place.
=Sum(((nz(Price,0)*nz(Amount,0)*(nz(Discount,0)) +
nz(GeneralTaxes,0))*VAT)
mind you I think discount should be (1 - nz(Discount,0))