Help - Field calculated, but not stored..

pat_nospam

Registered User.
Local time
Today, 11:29
Joined
Oct 14, 2003
Messages
151
So, I've got a field that is running calculations for 5 other currency fields that need to add up correctly. However, I'm noticing that it's not storing into the table what the Total Amt is.

Now I realize this is likely due to the fact that the Control Source is set to be the value of those 5 currency fields added together, and not to it's parent field in the table, but how do I store that value into the Total Amt field in the table? I need to be able to record that calculation.

Thanks so much :)
 
Its best not to store calculated fields. Just calculate it when you need it in queries / reports etc.

Col
 
Colinessex's solution is the best.

But to get on with your question, the syntax is

[field-name]=textbox-name for eg. the fieldname is totamt and the calculated control name is calctotamt then

[totamt]=calctotamt in form_beforeupdate would do the trick.
 
Hmmm. Thank you for the response - as I do need to store this value.

However, the trick doesn't seem to work.

In my Billing Form, I clicked on form properties, and set the BeforeUpdate value to the following:

=[StoreTotalCharge]=[Total Charge]


It doesn't appear to do anything though..
 
Nevermind - just realized it was bad form (NF3)..

Please ignore this post.
 
pat_nospam said:
However, the trick doesn't seem to work.

In my Billing Form, I clicked on form properties, and set the BeforeUpdate value to the following:

=[StoreTotalCharge]=[Total Charge]

It doesn't appear to do anything though..

For benefit of others let me mention that the trick i mentioned above is fool-proof and has been used by me on some occasions now.Please check spelling mistakes , the form's recordsource carefully.

the syntax should be

[Storetotalcharge]=[total charge]

[field-name]=[calculated-controlname] in form_beforeupdate
 

Users who are viewing this thread

Back
Top Bottom