I want to make my form do math, however, I want it NOT to round up my number to the nearest one. For example I needed it to calculate (7)(25.90%). The correct answer is 1.813, however, it rounded that number up to 2. Any way I can do this?
The answer being rounded means that your answer is defined/declared somewhere (can't tell from your post) as
Long (integer). It needs to be defined as Single(Precision).
I think (not on a PC with Access, so I can't check) that Long is the default for a number, so you may not have deliberately chosen it.
For example:
Dim Numb as Long
Numb = 7
Numb * .2590 = 2
While:
Dim Numb as Single
Numb = 7
Numb * .2590 = 1.813
If you're saving the calculated result to a table, the field may be defined in the table as a "Long" instead of a "Single"
Thanks missinglinq! I found that using single works out. I also found out that if I changed it to currency, it'll also keep my numbers from being rounded.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.