Results 1 to 4 of 4
  1. #1
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276

    Calculation Problem In Query

    Am not getting the desired result from a query.


    Qty X GSTPrc = PrcCr
    If the Qty = 15780 & GSTPrc = 4.50 The result should be 71415

    whereas the query is calculating 15780 x 4.5001 and the result is 71416.59

    On the query I tried to use the Format "Fixed & Decimal Places to limit to 2 but not successful getting the desired result.




    Transaction Description Qty Price Sales Tax GSTPrc PrcCR Required Result
    Cullet (Green) 15,870.00 Rs. 3.85 17.00% 4.50 71416.59 71415.00
    Cullet (Green) 10,230.00 Rs. 3.85 17.00% 4.50 46036.02 46035.00
    Cullet (Green) 11,650.00 Rs. 3.85 17.00% 4.50 52426.17 52425.00
    Cullet (Green) 13,100.00 Rs. 3.85 17.00% 4.50 58951.31 58950.00
    Cullet (Green) 16,310.00 Rs. 3.85 17.00% 4.50 73396.63 73395.00
    Cullet (Green) 11,040.00 Rs. 3.85 17.00% 4.50 49681.10 49680.00
    Cullet (Green) 10,860.00 Rs. 3.85 17.00% 4.50 48871.09 48870.00
    Cullet (Green) 14,680.00 Rs. 3.85 17.00% 4.50 66061.47 66060.00
    Cullet (Green) 15,010.00 Rs. 3.85 17.00% 4.50 67546.50 67545.00
    Cullet (Green) 14,050.00 Rs. 3.85 17.00% 4.50 63226.41 63225.00
    Cullet (Green) 25,720.00 Rs. 3.85 17.00% 4.50 115742.57 115740.00
    Cullet (Green) 14,000.00 Rs. 3.85 17.00% 4.50 63001.40 63000.00
    Cullet (Green) 11,050.00 Rs. 3.85 17.00% 4.50 49726.11 49725.00
    Cullet (Green) 14,650.00 Rs. 3.85 17.00% 4.50 65926.47 65925.00
    Cullet (Green) 13,680.00 Rs. 3.85 17.00% 4.50 61561.37 61560.00
    Cullet (Green) 2,020.00 Rs. 3.85 17.00% 4.50 9090.20 9090.00
    Cullet (Green) 10,740.00 Rs. 3.85 17.00% 4.50 48331.07 48330.00
    Cullet (Green) 15,920.00 Rs. 3.85 17.00% 4.50 71641.59 71640.00
    Cullet (Green) 11,570.00 Rs. 3.85 17.00% 4.50 52066.16 52065.00


    Querry Used:

    SELECT Sales.[Transaction Description], Sales.Odered AS Qty, Sales.Price, Sales.[Sales Tax], ([Sales Tax]*[Price])+[Price] AS GSTPrc, [GSTPrc]*[Odered] AS PrcCR
    FROM Company INNER JOIN Sales ON Company.CoId = Sales.CoId
    WHERE (((Sales.[Transaction Description])="Cullet (Green)"));

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    It has to do with rounding.
    ([Sales Tax]*[Price])+[Price] = 4.5045
    Round(([Sales Tax]*[Price]),2)+[price] = 4.50

    Try this
    Code:
    SELECT Sales.[Transaction Description], Sales.Odered AS Qty, Sales.Price, Sales.[Sales Tax], Round(([Sales Tax]*[Price]),2)+[Price] AS GSTPrc, [GSTPrc]*[Odered] AS PrcCR
    FROM Company INNER JOIN Sales ON Company.CoId = Sales.CoId
    WHERE (((Sales.[Transaction Description])="Cullet (Green)"));

  3. #3
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276
    Thx it worked

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Wonderful.....

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

Similar Threads

  1. Calculation problem
    By DMT Dave in forum Access
    Replies: 2
    Last Post: 05-30-2019, 06:33 PM
  2. Calculation problem
    By DMT Dave in forum Access
    Replies: 2
    Last Post: 05-30-2019, 12:37 AM
  3. Calculation between two query fields problem
    By djokatore in forum Queries
    Replies: 6
    Last Post: 10-09-2015, 09:27 AM
  4. Calculation Field in table vs Query calculation
    By Leonidsg in forum Database Design
    Replies: 18
    Last Post: 02-28-2013, 09:38 PM
  5. Calculation problem
    By cometdragon in forum Queries
    Replies: 2
    Last Post: 07-28-2010, 08:54 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