View Full Version : calculation


hayden
03-20-2010, 08:49 AM
hi im new to access

i have created my tables, relationships and forms but i want to make a calculation in my tables for cost by multiplying two numbers, where do i enter the formula and also it relates to the names of the texts in my form e.g. 'text23' does this effect it?
Hayden

John Big Booty
03-20-2010, 09:53 AM
I'm guessing you are approaching this from an Excel view point.

In Access it is generally considered bad practice (not to mention a breach of the rules of normalisation (http://en.wikipedia.org/wiki/Database_normalization)) to store calculated values (there are a very small number of exceptions to this rule).

Firstly Access does not operate in the same way that Excel does, so changes to the underlying values will not automatically be reflected in the calculated result. Secondly why waste space storing a value that is really only required for display purposes, and can therefore be just as easily calculated either on the form/report or in the query populating the form/report.

hayden
03-20-2010, 10:02 AM
the problem is that it is for a booking system so when i use a report to show orders (as we deliver) total cost minus discount (multi item discount) is not reflected and since cash on delivery would be very awkward.

John Big Booty
03-20-2010, 10:09 AM
Your report is being populated by a query, so all you just need to do your calculation in the query that is populating your report. Bear in mind you may not be able to do this in a single query, you may have to use a set of cascading queries to achieve you end goal.

hayden
03-20-2010, 10:10 AM
Ok thank you very much i see what i have to do now