Inconsistent rounding using Long Integer

G

Guest

I have a database that does calculations and shows the results. I cannot
figure out the rounding convention for long integer. When I have an answer
that is X.5, such as 2.5 or 3.5, sometimes the result is rounded up,
sometimes it is rounded down, but I cannot find a pattern as to why it does
this. Any clues?
 
G

Guest

Hi.

Access is using "Banker's rounding," which rounds to the nearest even
number. That nearest even number may be up or down, which is why the
behavior seems inconsistent.

For a work-around, please see the following Web page:

http://www.mvps.org/access/modules/mdl0054.htm

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts, so that all
may benefit by filtering on "Answered questions" and quickly finding the
right answers to similar questions. Remember that the best answers are often
given to those who have a history of rewarding the contributors who have
taken the time to answer questions correctly.
 
O

onedaywhen

dsmith76 said:
I have a database that does calculations and shows the results. I cannot
figure out the rounding convention for long integer. When I have an answer
that is X.5, such as 2.5 or 3.5, sometimes the result is rounded up,
sometimes it is rounded down, but I cannot find a pattern as to why it does
this.

For the definitive guide to rounding used in MS products, see:

http://support.microsoft.com/default.aspx?scid=kb;en-us;196652

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top