transfering calculated records from forms to tables

E

eman

I have designed an invoice ...... which i made all the calculations in the
form i designed two tables for this invoice one for the main form and one for
the subform and there is no relationship between the two.....i want the
records that are entered in the form of this invoice to appear in the
table.....Can anybody help me with this problem?? i need a fast reply as i
must send my project within one week or so.
 
A

Al Campagna

eman,
As a general rule, you don't save the result of a calculation to your
table. Since you have saved all the elements of the calculation, you can
always recalculate,"on the fly", on any subsequent form, query, or report.
For example... [Price] * [Qty] = LineTotal
Price and Qty are bound controls, bound/captured to thier respective
fields in your table. Any time you need to display the LineTotal, just
recalculate from Price and Qty with a calculated unbound text control with a
ControlSource of = Price * Qty.

If you must save the result of a calculation, use the AfterUpdate event
of the calculation elements.
(using the same example)
Create a field in your table LineTotal.
Place a text control on your form, bound to LineTotal.
On BOTH the Price and Qty AfterUpdate events...
[LineTotal] = [Price] * [Qty]
That will save the calc to your table, and if either Price or Qty
change, the LineTotal will recalculate.

--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top