firstdivision
MIS
Hi,
I have a function that (basically) multiplies two numbers together. The two input parameters are Double data types. The values that get put into these parameters come out of a SQL server 2000 database (stored as real).
When I hover over the statement that calls the funtion, the value that comes up in the tool tip is 1.38, which is ther correct value that is stored in the database. I assume that this means that up until this point everything is working as planned...
However, once inside the VBA function the value stored in the Double variable is 1.37999999523163 NOT 1.38. In most circumstances this is not a problem, but every once in a while it results in the calculation being off a cent or two. It's the same for other numbers as well, 2.41 becomes 2.41000008583069.
Is this a result of Access/VBA doing some conversion as it passes the number around? I would really like it to use the number I intended it to and not something else! :-D
Thanks,
FD
I have a function that (basically) multiplies two numbers together. The two input parameters are Double data types. The values that get put into these parameters come out of a SQL server 2000 database (stored as real).
When I hover over the statement that calls the funtion, the value that comes up in the tool tip is 1.38, which is ther correct value that is stored in the database. I assume that this means that up until this point everything is working as planned...
However, once inside the VBA function the value stored in the Double variable is 1.37999999523163 NOT 1.38. In most circumstances this is not a problem, but every once in a while it results in the calculation being off a cent or two. It's the same for other numbers as well, 2.41 becomes 2.41000008583069.
Is this a result of Access/VBA doing some conversion as it passes the number around? I would really like it to use the number I intended it to and not something else! :-D
Thanks,
FD