N
Nexus
how do I create a formula to calculate total amount using
both a control (txtNewQty) and a query?
both a control (txtNewQty) and a query?
Nexus said:I want to multiply qty by price per unit using both the
control and the query together. This is what I've done
and it seems to work but how do I then store the value of
txtTotalPrice into the table with field name TotalPrice?
Private Sub cmdTotalPrice_Click()
txtTotalPrice = (DLookup("[qryToolPrice]!
[ToolPrice]", "qryToolPrice", "[qryToolPrice]![ToolID]='"
& [lstGetToolDetail] & "'")) * txtNewQty
End Sub
-----Original Message-----
in a query you can use Sum(), in control you can use also Sum() - to make
total of some filed of form recordsource, or DSUM() - to sum any table or
query. see online help for more info
--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
.