Hi again, I’ve hit another problem, I hope someone can help.
I have a table [tblTreatment Received] that contains numerous records for the same single record in the other table [tblAppointments]. The [tblAppointments] table is therefore related to the [tblTreatment Received] in a one-to-many relationship.
I have created an update query that I want to update a field in the main table [tblAppointments] with the sum of all the Unit Costs from the related table. At the moment, it's only updating it with one of them. E.g. there are three unit costs saved for one appointment , £200, £50 and £25; when I run the query, the field updates to £25 instead of £275. At present, the query is set to update the field [AppCost] in the [tblAppointments] table and in the ‘update to:’ I’ve simply entered ‘[tblTreatmentRec eived].[Unit Cost].
Does anyone know how to make an update query update the field with the sum of all of the fields rather than just one. I tried using Sum() but no go.
Thanks a lot.
I have a table [tblTreatment Received] that contains numerous records for the same single record in the other table [tblAppointments]. The [tblAppointments] table is therefore related to the [tblTreatment Received] in a one-to-many relationship.
I have created an update query that I want to update a field in the main table [tblAppointments] with the sum of all the Unit Costs from the related table. At the moment, it's only updating it with one of them. E.g. there are three unit costs saved for one appointment , £200, £50 and £25; when I run the query, the field updates to £25 instead of £275. At present, the query is set to update the field [AppCost] in the [tblAppointments] table and in the ‘update to:’ I’ve simply entered ‘[tblTreatmentRec eived].[Unit Cost].
Does anyone know how to make an update query update the field with the sum of all of the fields rather than just one. I tried using Sum() but no go.
Thanks a lot.
Comment