Dear Linq and Fred:
The stored fields that are used for the calculations of SubTotal are saved
properly to the table.
I understand what you are saying but I would like to know IF it can be done.
I have a boss that likes to look at the table and he does not understand WHY
the values do not show in the table and yet they show in the form
Thank you
Maria
fredg said:
On Mon, 6 Jul 2009 04:23:01 -0700, Maria wrote:
Hello
I have a Textbox "SubTotal" that is bound (by calculations) to other fields
and has the following characteristics:
Name: SubTotal
Control Source: =([nm_Nodias]*[nm_Preciodia]+[nm_Porte])
When the record is saved - the data in SubTotal does not store in the table.
Is this because it's Control source is a calculation? If so, how do I go
about storing the data value?
Thank you in advance
Maria
When using Access, don't think spreadsheet, think relational database.
No need to store the result of this calculation.
As long as you have stored the various data parts needed in the
calculation, anytime you need the SubTotal, recalculate it.
Yes the calculated values can be saved in a table, but allowing a
"boss" (or anyone else) to look directly in the tables (instead of
using a form) is like allowing a 5 year old to play with matches in
the barn. :-(
It takes only a fraction of a second for someone, even the boss, to
inadvertently delete, change, or otherwise alter the data. What would
you do if one of the values used to calculate the SubTotal were to be
changed? You now have a SubTotal field that 'doesn't add up'.
Don't do it.... please.
If you need to display the data like a table, create a query that
displays all of the fields plus the calculated SubTotal data. Display
the query records in a form bound to this query (in Form Datasheet
View). It will look like a table, read like a table, and feel like a
table. Best of all, no one will be able to change existing data. And
the SubTotal will always 'add up'.