Decimal Places

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
 
S

SA

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
 

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