data on forms

  • Thread starter Thread starter dida
  • Start date Start date
D

dida

If I use a calculation on my form I can't get the result
to read on my original table. What do I do to get the
information to process?
 
Dida,
Since the field on your form has a calculation as it's RecordSource, it's
not "bound" to any field in your table. This is an often posted question...
"How do I save the results of a calculated field (on my form) to my table?"

First, in most instances, you don't "save" calculations in a table. If
you had Price and Qty, you wouldn't have to save the 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.. using a calculated "unbound" field on the form.

You don't indicate what fields go into your calculation, so let's use my
example above, and you apply it to your field/s

If you MUST capture the calculation, remove the calculation in the
ControlSource of LineTotal, and "bind" the control to your LineTotal field
in your table, and
on the AfterUpdate event for Price AND Qty...
LineTotal = Price * Qty
That way, if you enter (or change) either Price or Qty your LineTotal
field will be updated and "captured"... since LineTotal is "bound" to the
LineTotal field in your table.
-
HTH...
Al Campagna
Candia Computer Consulting
Candia, NH
 
Back
Top