Hi,
It appears that there are at least 2 different ways of accomplishing this task. The first solution is performed inside of a form, where the TotalValue field is "locked". This field is calculated in the "AfterUpdate" event of the Cost field. Essentially then, this is being calculated every time a new record is being added.
The second technique is to create an update query. In the first column of the query is the field you wish to update (TotalValue). You would have two additional fields in the query (these are Quantity and Cost). In the "Update to:" row of the TotalValue column, simply use this code: Quantity*Cost
When you run this, each record will be examined, and the calculation will be made. If either value is zero, the result will be zero (but then, you already knew that!!)
Hi,
I just realized that you only wanted to do this in "design time" (it's only mentioned in the thread title). Actually, I don't have a solution for that. Of course, the update query that I explained can be run anytime. HTH,
Randy Smith
California Teachers Association
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.