Totals

  • Thread starter Thread starter Liz C
  • Start date Start date
L

Liz C

I have a field that I need totals for in a group footer. The detail control
is

=IIf([ContractNo]=10000007,([CurrentWEst]+[PriorWAct]+[PriorWEstNew]-Nz([Fuel]))*1.017708,[CurrentWEst]+[PriorWAct]+[PriorWEstNew]-Nz([Fuel]))

I tried the following for the total, but end up with a rounding problem -
the total came up with one more than the actual total should be:

=Sum(IIf([ContractNo]=10000007,([CurrentWEst]+[PriorWAct]+[PriorWEstNew]-Nz([Fuel]))*1.017708,[CurrentWEst]+[PriorWAct]+[PriorWEstNew]-Nz([Fuel])))

Any ideas would be greatly appreciated!

Thanks!

Liz
 
What happens if you display more decimal places? What is wrong with rounding
up or down?
 
Thanks, Duane. You helped me figure it out. I just rounded it at the detail
level and then at the sub-total also and it worked out.

Have a great day!

Liz


Duane Hookom said:
What happens if you display more decimal places? What is wrong with rounding
up or down?

--
Duane Hookom
Microsoft Access MVP


Liz C said:
I have a field that I need totals for in a group footer. The detail control
is

=IIf([ContractNo]=10000007,([CurrentWEst]+[PriorWAct]+[PriorWEstNew]-Nz([Fuel]))*1.017708,[CurrentWEst]+[PriorWAct]+[PriorWEstNew]-Nz([Fuel]))

I tried the following for the total, but end up with a rounding problem -
the total came up with one more than the actual total should be:

=Sum(IIf([ContractNo]=10000007,([CurrentWEst]+[PriorWAct]+[PriorWEstNew]-Nz([Fuel]))*1.017708,[CurrentWEst]+[PriorWAct]+[PriorWEstNew]-Nz([Fuel])))

Any ideas would be greatly appreciated!

Thanks!

Liz
 
Back
Top