jaxxstorm
03-14-2007, 07:24 AM
Earlier in the week, I was given this useful code to automate a cost calucation field in my form
Forms!MakeOrders!CostOfOrder = DSum("[OrderAmount]", "qryCostCalculation", "[OrderNo] = " & Forms!MakeOrders!OrderNo)
taking the value from a query which calculated the orderamount.
However, I've now noticed it is adding up all the orderamounts for each order in the query, including previous orders.
Is there a way of JUST taking one line of the order amount query? Possibly clearing the query after it's used so the order amount is not incremental?
Any help much appreciated
Forms!MakeOrders!CostOfOrder = DSum("[OrderAmount]", "qryCostCalculation", "[OrderNo] = " & Forms!MakeOrders!OrderNo)
taking the value from a query which calculated the orderamount.
However, I've now noticed it is adding up all the orderamounts for each order in the query, including previous orders.
Is there a way of JUST taking one line of the order amount query? Possibly clearing the query after it's used so the order amount is not incremental?
Any help much appreciated