Decimal Places

  • Thread starter Thread starter Clint
  • Start date Start date
C

Clint

I have a calculation on a field on a report and I have
the Decimal Places value set to 2. Of course, this
rounds the actual value up or down. What I want to do is
to cut the value of the calculation at the 2nd decimal
place without rounding.

The calculation is set as the Control Source. It is:

=([SumOfDifference]*DLookUp
("[InvoicePercentContribution]","tblInvoicePercentContribu
tion","[JackpotName] = '" & "Magic Jackpot" & "'"))

Is there any way to do this? I've been asked to do this,
even though rounding seems like the right way to go. The
owners of my DB want the values to match another report
that has the same source data.

Thanks,
Clint
 
Clint probably the easiest way to do this is to move the decimal places over
two and then use the Fix function which truncates to an integer and redivide
by 100 as in:

=Fix((([SumOfDifference]*DLookUp("[InvoicePercentContribution]","tblInvoiceP
ercentContribu
tion","[JackpotName] = '" & "Magic Jackpot" & "'"))*100)/100
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg


Clint said:
I have a calculation on a field on a report and I have
the Decimal Places value set to 2. Of course, this
rounds the actual value up or down. What I want to do is
to cut the value of the calculation at the 2nd decimal
place without rounding.

The calculation is set as the Control Source. It is:

=([SumOfDifference]*DLookUp
("[InvoicePercentContribution]","tblInvoicePercentContribu
tion","[JackpotName] = '" & "Magic Jackpot" & "'"))

Is there any way to do this? I've been asked to do this,
even though rounding seems like the right way to go. The
owners of my DB want the values to match another report
that has the same source data.

Thanks,
Clint
 
Back
Top