Re: Rounding Negative Number Toward Zero

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Jack" <Jack@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
>
> So, what I decided to do is create a condition in my procedure and force the
> value being passed in down to an appropriate number so it'll round the way I
> want. Here is my code:

Another way to skin that cat:

Function RoundOff(ByVal Value As Double) As Double
RoundOff = Int(Value * 100 + 0.5) / 100 * Sgn(Value)
End Function

LFS


.



Relevant Pages

  • Re: Calculating percentages
    ... I knew there was more than one way to skin a cat! ... "George Nicholson" wrote: ... Prev by Date: ...
    (microsoft.public.access.forms)
  • Re: Multiple Values within Multi-Value Fields...
    ... That will definitely work, and proves there's more than one way to skin a ... cat. ... Prev by Date: ...
    (comp.databases.pick)
  • Re: OT : How To Give Your Pet A Pill
    ... >> Then there's the outside cat, named the Yellow Cat. ... >> head and neck was a 4-inch flap of dead skin and putrefied flesh. ... >> he was still alive in the morning, I'd take him to the vet. ...
    (alt.support.mult-sclerosis)
  • Re: OT : How To Give Your Pet A Pill
    ... > Then there's the outside cat, named the Yellow Cat. ... > head and neck was a 4-inch flap of dead skin and putrefied flesh. ... > he was still alive in the morning, I'd take him to the vet. ...
    (alt.support.mult-sclerosis)
  • Re: OT : How To Give Your Pet A Pill
    ... Then there's the outside cat, named the Yellow Cat. ... head and neck was a 4-inch flap of dead skin and putrefied flesh. ... he was still alive in the morning, I'd take him to the vet. ...
    (alt.support.mult-sclerosis)