Where is the best place to perform calculations? I am working on a fairly simple database. The tables and relationships are set, and confirmed correct.
To summarize, I have a customer table (One to Many) Menu table, Items table and Items detail table(Joins Menu and Items).
I have a form with subform to record Items detail per Menu.
I then need to calculate the total cost of items ordered: Line Item Total=[unitprice]*[quantity]. Subtotal= SUM([Line item total])
This is then used to calculate tax,service charge and grand total:
Tax=[Subtotal]*0.1,
Service=[Subtotal]*0.2
Grand Total= [Subtotal]+[Tax]+[Service]
I want to perform these calculations on the sub total of each Menu, not on each line item of the order.
I know calculated fields do not get stored in tables.
Should I put all the calculations in the footer of the form?
When I try a query, it won't let me use the calculated field Subtotal in the other calculations.
Should I put the calculations in a report?
I will need to eventually pull data in several formats in reports - Individual Menu, Totals by day, totals by week,etc. and don't want to repeat the calculations on each report.