Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have two fields in tblTaxRate where StateSalesTaxRate = 5.75% and LocalSalesTaxRate = 2.00%. Both fields are set up as follows:
    DataType = Number
    Field Size = Single
    Format = Percent
    Decimal Place = Auto

    In a query if a dollar field is multiplied by the individual tax rate then the correct amount is returned
    Where RoomRate = $100 State sales tax amount = $5.75 and Local tax amount = $2.00

    If a calculated field is created, TotalTaxRate:[StateSalesTaxRate] + [LocalSalesTaxRate] it returns 0.05750.02 instead of 0.0775.

    Any suggestions as how to fix the problem.

    Tom

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts
    The only things I can suggest is that one of the fields was defined as Text, or that you used an & instead of + in the equation in the query.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Tom,

    Try this is works for me.

    Extension: Round((Round([Taxes]![StateSalesTaxRate]+[Taxes]![LocalSalesTaxRate],4)+1)*[Taxes]![RoomRate],2)


    Subistitute your table name for [Taxes] of course.

    RG
    Attached Images Attached Images
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  4. #4
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your solution. I solved the problem slightly differently. Leaving out the rounding functions I used

    TotalTaxeAmt: [RoomRate] * [StateSalesTaxRate] + [RoomRate] * [LocalSatesTaxRate]

    Tom Goodwin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •