Results 1 to 9 of 9
  1. #1
    Katya is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Posts
    5

    Summing problems

    My query doesn't take into account decimals when giving totals. I have to sum the numbers (currency) from another query. Everything looks fine, but the total amount is just the whole numbers (and zeros instead of decimals)


    Can anybody help?

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    How is your field that you are summing formatted in your original table.

    Alan

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Is the datatype of the table field set to Double? The data is entered with decimals and they show properly in table?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Katya is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Posts
    5
    Thank you for the reply.

    The query is made out of another query. In the previous, the calculations for the row were based on multiplication of "price per day" and numbers of days, where the given result was in "currency".
    When later I try to sum the results, the decimals ($##.##) are not calculated at all, just the numbers before "." So there is not evan a rounding

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    I cannot replicate your issue. Do you want to provide project for analysis? Make copy, remove confidential data, run Compact & Repair, zip if still large.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    Katya is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Posts
    5
    Query1orderIDfixGMSumOfCartCost5216$2,068.50$76.005223$2,080.50$76.005234$2,109.50$76.005245$2,076.50$76.005253$2,215.50$48.005269$1,494.50$27.005270$1,485.50$27.005281$1,498.50$27.005295$1,497.50$27.005306$875.00$0.005314$875.00$0.005328$875.00$0.005334$497.00$0.005341$497.00$95.005356$497.00$95.00 As you see, the last column sums up only the whole numbers, thus, returning zeroes when there were sents (#5306-5334)

  7. #7
    Katya is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Posts
    5
    The problematic query is "Query1" with the last row returning the summed values of only dollars and zeroes for cents. Thus, if a number in calculation is less than a dollar, it is not taken into account.

    Thanks

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    I changed the COST field in CART table to Double datatype and the calculations work. I pretty much always set number fields to Double.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Katya is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Posts
    5
    Great, thank you!

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

Similar Threads

  1. summing in a query
    By nparrillo in forum Queries
    Replies: 1
    Last Post: 04-11-2011, 10:37 AM
  2. summing
    By nashr1928 in forum Forms
    Replies: 18
    Last Post: 04-05-2011, 05:01 PM
  3. Summing reports
    By tarhim47 in forum Reports
    Replies: 0
    Last Post: 03-30-2011, 11:07 AM
  4. Summing a column
    By nashr1928 in forum Forms
    Replies: 2
    Last Post: 05-10-2010, 05:42 PM
  5. need help with summing a range
    By sundance0000 in forum Access
    Replies: 3
    Last Post: 01-12-2010, 02:12 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