Query not calculate numbers in 3rd decimal or after correctly.

accessfever

Registered User.
Local time
Yesterday, 17:59
Joined
Feb 7, 2010
Messages
101
Hi,

I have a query to calculate the "initial" amount time "Discount Rate" to come up with the "Final" amount.

However, the example below the Access query gives me 297132.6609 when I calculate it manualy I have 297132.6649. Since I want the numbers are correct at 4th decimal places, I wonder if there is a way to fix it. Any help will be appreciated.



InitialDiscount RateFinal3537293.630.084297132.6609
 
When I create a table and put 3537293.63 into field Initial as a Double, put .084 into field DiscountRate as a Double and divide Initial by DiscountRate a query I get 297132.66492

Is all of that correct? Are Initial and DiscountRate fields in a table? Are they of the type Double?

I recall having run into this issue before when I have used an aggregate sub-query to sum up a few fields then in the main query I divided a summed field by another summed field and was off a small percentage of what it should have been. Could that be the issue? Are Initial and DiscountRate fields in a table, or fields of an aggregate query?
 
I remember I set the data type is Single not Double for "Discount Rate" field so it might be the reason I couldn't get correct data at 3rd and 4th decimal places. I will try it later. Thanks for your responses!
 
I changed the data from Single to Double and the query was still not working. When I changed to Currency, the query worked to have accurate data at 4th decimals. Thanks Pat!
 

Users who are viewing this thread

Back
Top Bottom