report+truncate

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • J.J.

    report+truncate

    hi,
    I have in my report SUBTOTAL=Sum([AmountPaid]), then TAX=[SUBTOTAL]*0,22 and
    TOTAL=[SUBTOTAL]+[TAX]
    The SUBTOTAL is 6029,80. I sholud get the following values for TAX=1326,556
    and for TOTAL=7356,356. I don't need the third decimal and the access
    returns me folowing TAX=1326,56 and TOTAL=7356,36 but it should be for
    TAX=1326,55 and TOTAL=7356,35.
    Please help me, I know it's something with truncate but I'm not coming
    along.
    Thanks very much
    J.J.


  • Wayne Morgan

    #2
    Re: report+truncate

    If the value for tax is 1325,556 and you shorten it to display two decimals,
    it will round to 1325,56. If you are wanting to truncate instead try:

    TAX=Int([SUBTOTAL]*0,22*100)/100
    or
    TAX=Int([SUBTOTAL]*22)/100

    --
    Wayne Morgan
    Microsoft Access MVP


    "J.J." <nospam@jj.co m> wrote in message news:cequfq$d4r $1@ls219.htnet. hr...[color=blue]
    > hi,
    > I have in my report SUBTOTAL=Sum([AmountPaid]), then TAX=[SUBTOTAL]*0,22
    > and
    > TOTAL=[SUBTOTAL]+[TAX]
    > The SUBTOTAL is 6029,80. I sholud get the following values for
    > TAX=1326,556
    > and for TOTAL=7356,356. I don't need the third decimal and the access
    > returns me folowing TAX=1326,56 and TOTAL=7356,36 but it should be for
    > TAX=1326,55 and TOTAL=7356,35.
    > Please help me, I know it's something with truncate but I'm not coming
    > along.
    > Thanks very much
    > J.J.
    >
    >[/color]


    Comment

    Working...