Totals

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
 
D

Duane Hookom

What happens if you display more decimal places? What is wrong with rounding
up or down?
 
L

Liz C

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top