Results 1 to 5 of 5
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    Unhappy Query to stop rounding off currency

    Hi,



    I have one field (table) with price and I have added the current GST (percentage) from another table and field.

    In the query I have made a query field "total" and entered the formula.

    Price is with Currency - dollar and GST is Currency - percent in their table with 2 decimal each.

    I want the price to round have 10% added to it so $4.40 added with % however I am getting $4.50 - a round down.

    The total is in currency format (query field properties).

    I'm assuming it's just adding the unit 10 and then adding it instead of calculating it as a percentage...?

    I've also added currency to the price properties in the query and percentage to the gst in the query without much affect.
    Function so far.
    Code:
    Total: IIf([GSTCheckBox]=True,[CostPriceExGST]+[GSTPercent],Val([CostPriceExGST]))
    What am I doing wrong here....
    Last edited by Ruegen; 07-24-2013 at 07:24 AM.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Your math is wrong. It would be

    cost + (cost * GST)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Solved. I did this and it gets me the result I need.

    Code:
    Total: IIf([GSTCheckBox]=True,[CostPriceExGST]+[GSTPercent]+[CostPriceExGST],Val([CostPriceExGST]))

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Really? That would yield

    4.40 + .10 + 4.40 = 8.90

    That's the correct result?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by pbaldy View Post
    Really? That would yield

    4.40 + .10 + 4.40 = 8.90

    That's the correct result?
    Correct - normally your formula is the correct one - however my foruma first gets 10% then I add that 10% to the original price and it gets me the 10% plus the original = result I want.

    I wanted to have the user add a percentage in a field on a form. Since I don't know what that percentage will be until the user decides I have to calculate fields only.

    I will use your forumla next time though!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Rounding a number in a query
    By libraccess in forum Queries
    Replies: 3
    Last Post: 08-25-2012, 09:13 AM
  2. percent query rounding less than .5 up
    By jtmo3 in forum Queries
    Replies: 3
    Last Post: 05-04-2012, 02:52 PM
  3. Replies: 2
    Last Post: 03-23-2011, 11:43 AM
  4. Stop text box from rounding decimals
    By Deutz in forum Access
    Replies: 1
    Last Post: 02-17-2011, 07:32 PM
  5. Replies: 2
    Last Post: 11-29-2009, 12:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums