Text boxes control source = calculation can't save sum

patentinv

Registered User.
Local time
Today, 01:31
Joined
Aug 29, 2005
Messages
29
Hello,
I've got a text box on my form header with a calculation in the control source that adds values from other text boxes on my form.
My problem is that since the calculation is in the control source of my text box I can not save the sum of the calculation to a field on the forms bound table.
Is there a way to move this calculation out of the control source and still have the calculation populate this text box with the sum of the calculation, so I can choice a field in which to save this calculations sum.

Calculation in the text box control source=
[Tot40yrcomp]+[Totfelt1536]+[Totfelt3036]+ there will be many more other text boxes added.

Thanks--Any help will be greatly appreciated.
 
You'll find that it is not prudent to store calculations in your table. Unless your fields have data that will change due to something like a price change and you need to store historical price data, then you should not store the calculation as it can be done at any time. This is a fairly strong rule.

Now, let's say that you had an item whose price changes, you can store the historical price by using a separate table and have the item id, price, and start and ending dates for the price. That way you could link the other table to it, and based on the date of sale, calculate the price at the time of sale.

Now this scares me a little:
]+[Totfelt1536]+[Totfelt3036]+

because it looks like you may be doing something that flies in the face of normalization of your tables. I realize you may not, because I don't know the whole story, but to see something like Totfelt with a number after it, makes me go, "hmmm." Especially when you say there will be many more textboxes like it.

So, you may not be doing something like that, but if you are I think you should search in these forums for info on normalization.
 

Users who are viewing this thread

Back
Top Bottom