chris-uk-lad
Registered User.
- Local time
- Today, 09:38
- Joined
- Jul 8, 2008
- Messages
- 271
I have a table of numeric values (Double, 6dp, Fixed), when I try to sum these together in a query I get incorrect results (e.g. 100.8 – 100.7 = 9.99999999999943E-02 instead of .01.
I’ve tried experimenting with the data type, making them standard instead of fixed, using CDbl/CLng, aswell as my own function which does the following to convert to use CDec as this is in Access 97:
Might anyone have an idea of how to sum these correctly?
Much appreciated
I’ve tried experimenting with the data type, making them standard instead of fixed, using CDbl/CLng, aswell as my own function which does the following to convert to use CDec as this is in Access 97:
Code:
Function Subtract_val(val1 As Double) As Double
Subtract_val = CDec(val1)
End Function
Might anyone have an idea of how to sum these correctly?
Much appreciated