#Error message when adding items with a 0 or -1.
I have fields that are generated with a checkbox which results in a -1 in the underlying table if it the box is checked and a 0 if it was checked at one time and then is unchecked. However, I cleared out all entries in some of the fields - to have a clean slate for the new school year. Now, since there are no 0s or -1s my sum calculations result in an #error message on the reports. If I go and put in some 0s, it fixes it - but I would like to fix it properly with a correct calculations
Original Expression =Sum([ESY READ])*-1
(this worked great while there was something to add
(0 or -1) in the fields. I was multiplying it by *-1
to add up the -1s and then change them to a positive #.
Some of the many expressions that I have tried:
=IIf(IsNull(sum([ESY READ])),0,sum([ESY READ])*-1)
=IIf(Sum([ESY READ]) IsNull,0,Sum([ESY READ])*-1)
=IIf(IsNull Sum([ESY READ]),0,Sum([ESY READ])*-1)
=IIf(IsNull(Sum([ESY READ])),0,Sum([ESY READ])*-1)
=Sum(IIf([ESY READ]) IsNull," ",Sum([ESY READ])*-1)
=If(Sum([ESY READ])="",0,Sum([ESY READ])*-1)
I have also experimented with the Count function since I am basically counting records that have a -1 in the [ESY READ] field. Also, I have a built in query for the report that only pulls records if a -1 exist in the ESY READ field.
Any help would be greatly appreciated!
I have fields that are generated with a checkbox which results in a -1 in the underlying table if it the box is checked and a 0 if it was checked at one time and then is unchecked. However, I cleared out all entries in some of the fields - to have a clean slate for the new school year. Now, since there are no 0s or -1s my sum calculations result in an #error message on the reports. If I go and put in some 0s, it fixes it - but I would like to fix it properly with a correct calculations
Original Expression =Sum([ESY READ])*-1
(this worked great while there was something to add
(0 or -1) in the fields. I was multiplying it by *-1
to add up the -1s and then change them to a positive #.
Some of the many expressions that I have tried:
=IIf(IsNull(sum([ESY READ])),0,sum([ESY READ])*-1)
=IIf(Sum([ESY READ]) IsNull,0,Sum([ESY READ])*-1)
=IIf(IsNull Sum([ESY READ]),0,Sum([ESY READ])*-1)
=IIf(IsNull(Sum([ESY READ])),0,Sum([ESY READ])*-1)
=Sum(IIf([ESY READ]) IsNull," ",Sum([ESY READ])*-1)
=If(Sum([ESY READ])="",0,Sum([ESY READ])*-1)
I have also experimented with the Count function since I am basically counting records that have a -1 in the [ESY READ] field. Also, I have a built in query for the report that only pulls records if a -1 exist in the ESY READ field.
Any help would be greatly appreciated!