I have inherited a system. In part of this system there are 3 tables
MainTemplate
SUbTemplate
Parts
To keep it short
The maintemplate contains the name and also TOTALPRICE (see below)
The subtemplate hols all of the parts for the maintemplate which includes the number used
Parts contain the cost of each part
As mentioned above a TOTALPRICE is kept on maintemplate. I know with normalised data you shouldn't do this but that's how the system has been. It's not been a problem before as the parts for the maintemplate haven't chneged in number or price. Until now. TOTALPRICE if you had't gathered is the sum of the number of parts used * their price.
I've written a query and I can sum the number*price but I can't update the TOTALPRICE on the maintemplate. I've tried this using 1 and then 2 queries. I'm getting error messages such as "OPeration" must use an updateable query (this is when I have 2 queries" and "you tried to execute a query that does not include the specified expression xxxxx as an aggregate function"
Is there a way around this?
MainTemplate
SUbTemplate
Parts
To keep it short
The maintemplate contains the name and also TOTALPRICE (see below)
The subtemplate hols all of the parts for the maintemplate which includes the number used
Parts contain the cost of each part
As mentioned above a TOTALPRICE is kept on maintemplate. I know with normalised data you shouldn't do this but that's how the system has been. It's not been a problem before as the parts for the maintemplate haven't chneged in number or price. Until now. TOTALPRICE if you had't gathered is the sum of the number of parts used * their price.
I've written a query and I can sum the number*price but I can't update the TOTALPRICE on the maintemplate. I've tried this using 1 and then 2 queries. I'm getting error messages such as "OPeration" must use an updateable query (this is when I have 2 queries" and "you tried to execute a query that does not include the specified expression xxxxx as an aggregate function"
Is there a way around this?