Re: Very weird numeric values

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks! Thanks! Thanks! Thanks! Thanks!

Problem solved, i would NEVER figured that out myself as i am a self-taught
newbie..

This rocks!

Thanks Ken.

Ken Snell (MVP) wrote:
Because computers don't handle non-integer numbers precisely. A number with
the value 2.8421709430404E-14 essentially is zero, but because computers
slightly round numbers when storing them, zero minus zero minus zero minus
zero can add up to a very tiny difference, hence the value you see.

(I note that you're missing the second argument for the Nz function that is
wrapped around [b] value.)

If you're dealing with currency values, for example, recast the numbers in
the expression using the CCur function; that should eliminate the problems:

Balance:
CCur(Nz([a],0))+CCur(Nz([b],0))-CCur(Nz([c],0))-CCur(Nz([d],0))-CCur(Nz([e],0))-CCur(Nz([f],0))

One of my expression ("balance") in a query is:

[quoted text clipped - 11 lines]

Thanks in advanced.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-gettingstarted/200705/1

.



Relevant Pages

  • Re: UniBasic code that should work
    ... Yeah but yeah but yeah but... ... What's to scale when we're comparing 4.57 minus 4.58 with zero minus ... However the alternative of having N significant digits I can't remember ...
    (comp.databases.pick)
  • Re: UniBasic code that should work
    ... What's to scale when we're comparing 4.57 minus 4.58 with zero minus ... it must be an anomalous use of wide zero. ... However the alternative of having N significant digits I can't remember ...
    (comp.databases.pick)
  • Re: Word XP - Strikethrough Font & More oops
    ... Word MVP FAQ site: http://word.mvps.org ... "Tony C" wrote in message ... You can create a struck-through zero using the ... Once you've constructed the character, ...
    (microsoft.public.word.printingfonts)
  • Re: Word XP - Strikethrough Font & More oops
    ... There are fonts with this type of character, but they're not that easy to ... after the zero. ... Word MVP FAQ site: http://word.mvps.org ... >>> Mary Sauer MS MVP ...
    (microsoft.public.word.printingfonts)
  • Re: addnew results in "invalid use of null" message
    ... Doug Steele, Microsoft Access MVP ... (no e-mails, please!) ... >> has its Allow Zero Length property set to No. ...
    (microsoft.public.access.modulesdaovba)