This is being used in an update query
I am getting the sum if OLID = OLID
we recentltly added the the AND criterea and it is not working
Still getting the sum if OLID = OLID
This is the old Update to Statement that worked fine:
IIf(IsNull(DSum("[WorkLabor]","OrderLaborLine"," [OLID] =" & [OLID])),0,DSum("[WorkLabor]","OrderLaborLine"," [OLID] =" & [OLID]))
This is new one that gives same result as old:
IIf(IsNull(DSum("[WorkLabor]","OrderLaborLine"," [OLID] =" & [OLID] And [OrderLaborLine]![Additional]=No And [OrderLaborLine]![WorkChange]=No)),0,DSum("[WorkLabor]","OrderLaborLine"," [OLID] =" & [OLID] And [OrderLaborLine]![Additional]=No And [OrderLaborLine]![WorkChange]=No))
We beleive the "AND" critereas are not being acknowledged
Could someone clean this up for us so all the criterea is used to determined the sum?
I am getting the sum if OLID = OLID
we recentltly added the the AND criterea and it is not working
Still getting the sum if OLID = OLID
This is the old Update to Statement that worked fine:
IIf(IsNull(DSum("[WorkLabor]","OrderLaborLine"," [OLID] =" & [OLID])),0,DSum("[WorkLabor]","OrderLaborLine"," [OLID] =" & [OLID]))
This is new one that gives same result as old:
IIf(IsNull(DSum("[WorkLabor]","OrderLaborLine"," [OLID] =" & [OLID] And [OrderLaborLine]![Additional]=No And [OrderLaborLine]![WorkChange]=No)),0,DSum("[WorkLabor]","OrderLaborLine"," [OLID] =" & [OLID] And [OrderLaborLine]![Additional]=No And [OrderLaborLine]![WorkChange]=No))
We beleive the "AND" critereas are not being acknowledged
Could someone clean this up for us so all the criterea is used to determined the sum?