Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where best to put Calculations

Status
Not open for further replies.

storyboy

Programmer
Sep 16, 2004
25
US
Where is the best place to put calculations. Here is the problem. Within the bound control on my form, I have been putting calculations in the Control Source Property. This calculation is based on entry of other fields, shipping cost, and discount amount, etc. I need to see the result of the calculation in the form, but then it doesn't get saved in the table bound to the form. I am new to this, and this seems so simple but I am missing something. After hours of trying perhaps I have tunnel vision and can't see my error. Thank you for any and all help you can be. With out you I would be sunk. Thanks again. Tom
 
Seems correct, as storing calculated values that can be derived from other fields, violates the rules of normalisation, and isn't encouraged. See for instance Fundamentals of Relational Database Design.

Just calculate those values whenever you need them, in queries, reports...

Roy-Vidar
 
My situation is such that the user need to see the result of the calculations on the screen, in the form, as they are working. Yes I agree that good design doesn't mean storing the result of calculations related to known data, that which is already being stored. There are times when a violation gives end user what they ask for and not always what makes proper design. Please assist me with a way to get the data into the field of the table that is presented on the screen in the form. Thank you for your reply and please help me with this.
Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top