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?
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?
How is your field that you are summing formatted in your original table.
Alan
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.
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
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.
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)
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
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.
Great, thank you!