Decimal Places Lost in Query Expression

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When creating a query that divides two numbers, I loose the decimal places.
I get the whole number without any decimal numbers, just zeros.
Example: 100/11 = 9.09
My forumula returns 9.00
I have tried
1. Setting the properties for the query column and entering the fields
[Num1]/[Num2]
2. format(([Num1]/[Num2]),"Fixed")
3. format(([Num1]/[Num2]),"##0.00")
4. formatnumber(([Num1]/[Num2]),-1,-1)
I checked my regional settings and they are set to allow decimals.
It has to be a system/software issue.
Can anyone help?
 
I believe that this is likely happening because both of the numbers in the
expression are integers, so the result is being made to be an integer as well.

Try placing your field values inside the Cdbl() function, such as:

Cdbl(Num1)/Cdbl(Num2)

It is possible that it would work to use Cdbl(Num1/Num2), but I'm not sure
if Access would convert to integer before getting to the Cdbl() function.

HTH, Ted Allen
 
Back
Top