Force rounding up in form

  • Thread starter Thread starter AimeeK via AccessMonster.com
  • Start date Start date
A

AimeeK via AccessMonster.com

I have a calculation that converts markup to margin in a form. Basically,
when a user types in a value in one text box, the result in another text box
will be the corresponding margin. The calculation is encoded in the vba of
the form. My problem is that some of the numbers are not rounding up
properly. For instance, a markup of 8.75 should convert to 8.1, but instead
showing as 8.0, the raw data is actually 8.04597759246826. I would think
using a text box format of 0.0 should round it up, but it's not working. I
need it to display 8.1 at both the form and table levels for auditing
purposes. Not sure if it has to do with the banker's rounding in Access at
this point. I've tried everything...can anyone please help me? Thanks.
 
Thanks for replying, but I am aware of that, and I already have searched...as
I've stated, I've tried everything, which means I've tried everything else
suggested on here...no matter what I try, I can't get 8.04597759246826 to get
display 8.1.
Access doesn't have a "round up" function. There are suggestions if you
search for them.
I have a calculation that converts markup to margin in a form. Basically,
when a user types in a value in one text box, the result in another text box
[quoted text clipped - 6 lines]
purposes. Not sure if it has to do with the banker's rounding in Access at
this point. I've tried everything...can anyone please help me? Thanks.
 
Actually, there is a Round function in Access. It has some limitations, so it
may or may not work for you, but you can find info at this link;

http://www.techonthenet.com/access/functions/numeric/round.php

AimeeK via AccessMonster.com said:
Thanks for replying, but I am aware of that, and I already have searched...as
I've stated, I've tried everything, which means I've tried everything else
suggested on here...no matter what I try, I can't get 8.04597759246826 to get
display 8.1.
Access doesn't have a "round up" function. There are suggestions if you
search for them.
I have a calculation that converts markup to margin in a form. Basically,
when a user types in a value in one text box, the result in another text box
[quoted text clipped - 6 lines]
purposes. Not sure if it has to do with the banker's rounding in Access at
this point. I've tried everything...can anyone please help me? Thanks.
 
It would seem to me that if you wanted to round up to one decimal place,
then you should add 0.09 to the number and then TRUNCATE to one decimal
place.

Or something like that (I've got a BS in math, but I went to school with Abe
Lincoln...).
 
Back
Top