saving valu in tble 4m unbound txtbox

allahditta

New member
Local time
Today, 08:19
Joined
Dec 26, 2010
Messages
4
salam to all!
i hv a problem regarding an unbound text field containing the total on a form.i just want this total value ti save it in one of the field of a table which is 'subtotal'.as my text field is unbound and i want the data to shift from an unbound field to a table field.can anybody help me.
regards
 
thanks 4 replying sir.
actually i have a form named supplies containing a subform supplied product details.in a subform i hav different products supplied by a supplier.the total amount for each product is obtained by[total]=[unit price]*[quantity].i had also added the sum of all total of products on a subform n then displayed the total amount of all products supplied to a main form.
now i want this vaue to be stored in a field of a table as well coz i want to apply further queries upon it to find monthly supplies.m going 2 send u my software n problem is with 'supplies' form.hope u can understand my query.
 

Attachments

thanks 4 considering my problem sir.sir i dnt want to add hiden controls on my form.i just want that as when i move 4m one record to other total amount is displayed on a text box, on the mean while this total amount should be copied to field of a table.i will preffer to perform this task by making the textbox bound and then using SQL in after update or stuff like that.i had posted my software in previous post plz check it too n if u find any better solution then plz direct me in that way.regards
 
Again - you DO NOT STORE CALCULATED VALUES IN YOUR TABLE!!!! (is that clear enough?) You just recreate the calculation in a query, on a form, or on a report from the components that you store in the table. If you have all of the components that make up the calculation you do not store the calculation. This is a rule of normalization and also of maintaining data integrity.
 
I'm a bad bad boy and I do store (very sparingly) store Calculated values. Yes it is not normailisation but when you have to get penny perfect with some complex divisional calculations or want to know the availability it is a damn sight quicker to "total" values.

If you have large transactional tables and dealing with small subsets of data the results are immediate. I know that it is wrong but I'm quite happy to make my case to Bob.

I once worked on a system that hierarchical totals, financial reporting was just so sophisticated and thorough and then another that split out overheads to operational departments using a complex algorithm based upon descending hiearchy of departments. I agree that we should all take normalisation seriously but it performance and speed are impeded - cheat.

Despite update queries not totalling you are always:

Set Total to Zero
Set Total = Total + Value

If I ever visit Oregon Bob can whip my jolly backside.

Simon
 
Interesting observation Bob, as a general rule you are right you should not store calculated values, but there are always exceptions to the rule.
If you read my words again, I said that "If you have all of the components that make up the calculation you do not store the calculation." Which means, that there are times where you won't have all of the components available to store. Of course there could be some government requirement or such which requires that, but I haven't run across one yet.
As an interesting aside, I believe I read recently that the latest version of MS Access has a new field type which stores calculated values!
Yes, there is and it is there primarily because a web application can't use most functions like you can in a desktop app.
 
I'm a bad bad boy and I do store (very sparingly) store Calculated values. Yes it is not normailisation but when you have to get penny perfect with some complex divisional calculations or want to know the availability it is a damn sight quicker to "total" values.

If you have large transactional tables and dealing with small subsets of data the results are immediate. I know that it is wrong but I'm quite happy to make my case to Bob.

I once worked on a system that hierarchical totals, financial reporting was just so sophisticated and thorough and then another that split out overheads to operational departments using a complex algorithm based upon descending hiearchy of departments. I agree that we should all take normalisation seriously but it performance and speed are impeded - cheat.

Despite update queries not totalling you are always:

Set Total to Zero
Set Total = Total + Value

If I ever visit Oregon Bob can whip my jolly backside.

Simon

It is possible to do, but you do run a risk when doing this (unless you use the newest version (2010) and can use data macros to keep your data integrity no matter if the data gets changed by your events or someone changes it in the table directly. You run a risk if you store calculated values and don't have data macros available to you because if someone ever changed data at table level, the integrity of the data is shot.
 
Fortunately I had my glasses on - they help me see.

Simon
 

Users who are viewing this thread

Back
Top Bottom