Is there a form function in VBA that i can put code that will mean it is run every time something is changed in the controls on the form or will i need to put the function call in on the afterupdate(or similar) function for each control on the form?
ok.. what i have is a form with lots of controls(textboxes mainly) and a lot of them need calculated values in them. I need to keep them up to date if the values they depend on change.
hmm... im not the best at explaining things, so please bear with me.
I have a form for a quote system, and it has a lot of information that needs to be entered.
A lot of the information also has almost like 'default' values that depend on information entered earlier. I need a way of keeping these values up to date if they arent over ridden and the values they rely on change. this is all happening before i store the final values in the db. hope that helps clarify things
There are few cases when you should store calculated values. In my opinion, you only need to store them when you retrieve them multiple times. To speed up data retrieval, or if the calculation is very complex. In all other cases:
Storing calculated value increases the size of your table and requires additional time to retrieve data when running queries. Not to mention, it is a drain on storage space and a waste of memory. And as pat said, sometimes things happen to your tables when they shouldn't. Someone could alter the calculated value and throw off everything.