asked on
Dim n1 As Single, n2 As Single
n1 = 1234567.9
n2 = 1234567.8
Debug.Print n1 - n2
n1 = 12.9
n2 = 12.8
Debug.Print n1 - n2
Result:
0.125
9.999943E-02
The fix is to use proper type such as double or currency:
Dim n1 As Currency, n2 As Currency
n1 = 1234567.9
n2 = 1234567.8
Debug.Print n1 - n2
n1 = 12.9
n2 = 12.8
Debug.Print n1 - n2
Result:
0.1
0.1
ASKER
ASKER
ASKER
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
TRUSTED BY
ASKER
If you store 11.2 (in a double field), and subtract 8 (also stored in a double), you should get 3.2, not 3.19999980926514. As you say, it works Ok on other platforms.
There must be Microsoft acknowledgement, and hopefully a fix?