Strange Problem

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

Guest

Hello.
I have a table with a Double data type field that has the following value:

0.0141176470588235

After that i want to perform some operations on that table using VBA. The
problem is that whe i read the value to a Double type variable, the value
becomes 1.41176470588235

Why does this happen?
 
Luis said:
Hello.
I have a table with a Double data type field that has the following
value:

0.0141176470588235

After that i want to perform some operations on that table using VBA.
The problem is that whe i read the value to a Double type variable,
the value becomes 1.41176470588235

Why does this happen?

I've never heard of such a thing. Does this happen for all values in
that field? First, are you sure the data type of the field is not
Decimal, with a Scale applied, rather than Double? How are you reading
the value into your Double variable? Could you post the code?
 
It looks as if the second value is the FIRST but with the
exponitional(sp) suffix missing. The two values different by a factor of
100. To my knowledge the EXP should be displayed, but won't effect the
calculations. Double check the data type for the field and the DIM for
the variable invovled.
 
Found the solution. The value cannot have more that 16 decimal places.
If i Round the value to 15 or 16 decimal places there is no problem.

But it's still strange :)
 
Back
Top