Displaying calculated values from forms to tables

R

Reggie

Good day. Would someone please let me know how I could make my calculated
control values show in my table? My regular data entry on the form transfers
my data to the table however, all my calculated values do not get
transferred. Please let me know how this can be done.
 
F

fredg

Good day. Would someone please let me know how I could make my calculated
control values show in my table? My regular data entry on the form transfers
my data to the table however, all my calculated values do not get
transferred. Please let me know how this can be done.

would have been helpful had you posted the actual calculation so my
reply could have been specific instead of general.

Forms do NOT contain fields. Tables contain fields, forms contain
controls. This distinction might help clarify your thinking regarding
forms and tables.

To explain why your expression result is not being saved to your
table, as the control source of this form control is an expression
(and not the name of a field) how would Access know which field to
store the data in.

As a general rule, you do NOT store calculated data in any table.
As long as you have the fields that make up the calculation stored in
your table, any time you need the result, simply re-calculate it as
you are doing now. This assures that the result of the calculation is
always correct and up-to-date. What would happen to your calculated
data if you discovered an error in one of the previously entered
fields and changed it? You now have an incorrect calculated data
stored.
 
D

Douglas J. Steele

Typically you don't.

As fellow MVP John Vinson likes to say, "Storing calculated data generally
accomplishes only three things: it wastes disk space, it wastes time (a disk
fetch is much slower than almost any reasonable calculation), and it risks
data validity, since once it's stored in a table either the Total or one of
the fields that goes into the total may be changed, making the value WRONG."

Create a query based on your table, add the calculations to that query and
use the query wherever you would otherwise have used the table.
 
R

Reggie

fredg,

Thank you for the very useful information. Do you mind if I ask another
question? Since I cannot store calculated values in my table, would there be
a way of saving the form I used to calculate my values?

-- Reggie
 
R

Reggie

Douglas J. Steele,

Thank you for sharing your knowledge in Access. May I ask another question?
Can forms be saved? Reason for my asking is that if my calculations do not
appear on the table, would it be possible to go back to a particular form
number at a later time when I need the calculated data again?
 
D

Douglas J. Steele

In general, the form's always going to be there. What data is displayed on
it, though, depends on what recordset you pass to it.
 

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