|
Calculation bug
Microsoft Access Calculation Bug
The bug occurs if floating point numbers being calculated are declared as a double precision number, meaning the number has a long decimal figure, such as 3.14159263. The bug doesn't surface if the number is declared as a variant, which means Access should look at the number and determine if it's an integer or floating point number. And, the bug would only appear if the last decimal number were an odd number. For example, Access evaluates the multiplication equation of 41.51 by 100 as 4,150 instead of 4,151 if it decides 41.51 is a double precision rather than a variant. The obvious choice is to use a variant rather than double precision, but Microsoft's own documentation says to use double precision. It's important that Access programmers are aware of this problem. It's great that a simple work-around is available. We ask ITrain members to add this quick fix to their lesson plans when leading Access programming classes.
Damar Group, Ltd. helps business use technology. ITINFO is again accepting sponsors. Sponsor messages are included in ITINFO's email newsletter and are permanently posted to DGL's website and online reference areas. ITINFO is an electronic publication of Damar Group, Ltd., publisher of Training Express computer learning guides. Comments and submissions to info@dgl.com. Previous issues are on our website at dgl.com/dglinfo.
updated October 15, 1998
Return to DGL homepage |