Em,
In most instances, you don't "save" calculations in a table.
For example, if you had fields Price and Qty, you wouldn't have to "save"
a calculation like Line Total (LineTotal=Price*Qty). Since you've captured
Price and Qty in your table,
you can always "re-derive" the LineTotal... "on the fly",
in any subsequent form/query/report/ etc...
with a calculated "unbound" field with a RecordSource of...
= Price * Qty ' I think this is what you have now
Continuing with my sample calculation and my sample field name/s... (you
correlate to your own)
If you must capture the calculation,
Add the field to your table that will hold the calculated value.
(ex. LineTotal)
Remove the calculation you have in the ControlSource of LineTotal on
the form.
"Bind" the ControlSource of LineTotal to your LineTotal field
On the AfterUpdate event for BOTH Price AND Qty fields on your
form... run this code
[LineTotal] = ([Price] * [Qty])
That way, if you enter (or change) either Price or Qty on your form your
LineTotal
field will be updated with the new calculation, and saved in your table.
--
HTH...
Al Campagna
Candia Computer Consulting
Candia, NH
Em said:
Hi,
I have a form which calculates the difference between two user-imputted
numbers (to avoid errors), but the results don't show up in the
corresponding table. How can I do this?