I am trying to use DSUM in an Update query. When I run the query, none of my records in my table I'm attempting to update are updated due to a "Type Conversion Failure". Not sure why this is happening because the field that I'm updating (fld_Total_Amt_Allowed)is a Double, and the field that I'm summing to put in the field is a Double (fld_Amount).
I'm not sure if I'm having problems because of the Inner Join or the Where clause. I need to have the Where because I only want to do this update where the Decision field = "Allow".
My SQL is below for the query. Maybe I'm just missing something or have something in the same order??
UPDATE 104_BCRT_Creditor_tbl INNER JOIN 201_Claims_Register_Decisions ON [104_BCRT_Creditor_tbl].BCRT_Creditor_Num=[201_Claims_Register_Decisions].BCRT_Creditor_Num SET 104_BCRT_Creditor_tbl.fld_Total_Amt_Allowed = DSum("[fld_Amount]","[201_Claims_Register_Decisions]","BCRT_Creditor_Num='" & [104_BCRT_Creditor_tbl].BCRT_Creditor_Num & "'")
WHERE ((([201_Claims_Register_Decisions].fld_Decision)="Allow"));
I'm not sure if I'm having problems because of the Inner Join or the Where clause. I need to have the Where because I only want to do this update where the Decision field = "Allow".
My SQL is below for the query. Maybe I'm just missing something or have something in the same order??
UPDATE 104_BCRT_Creditor_tbl INNER JOIN 201_Claims_Register_Decisions ON [104_BCRT_Creditor_tbl].BCRT_Creditor_Num=[201_Claims_Register_Decisions].BCRT_Creditor_Num SET 104_BCRT_Creditor_tbl.fld_Total_Amt_Allowed = DSum("[fld_Amount]","[201_Claims_Register_Decisions]","BCRT_Creditor_Num='" & [104_BCRT_Creditor_tbl].BCRT_Creditor_Num & "'")
WHERE ((([201_Claims_Register_Decisions].fld_Decision)="Allow"));