I have a field used in data entry together with a flag. I put the value in this field into 3 other fields depending on the value in the flag field. I am using an IIF statement in the query expression to do this. The calculated fields end up as three columns in a report. I have been unable to add these fields together so that I can total them in the report. I cannot use Sum because each field is individual, they are not a column in a query. I have tried creating a column in the query which strings the IIF statements with a + in between, but this does not work.
IIf statement
poc816b: (Nz(IIf([816b]="borrower",Format([L816d],'$#,#00.00'),"")))
poc816s: (Nz(IIf([816b]="seller",Format([L816d],'$#,#00.00'),"")))
poc816o: (Nz(IIf([816b]="other",Format([L816d],'$#,#00.00'),"")))