Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / March 2008

Tip: Looking for answers? Try searching our database.

testing for errors

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anne - 13 Mar 2008 19:23 GMT
woI am comparing amounts in tow fields:Billing Difference:
IIf([SumOfAmt]>[AmountEst],[AmountEst]-[SumOfAmt]), which gave a lots of
empty fields and one field shows 0.00.
My second step is to show only the fields which: is not null or <>0.
This one line showed still up even thought it should not. SumofAmt and
AmountEst are identical. There are no fractions. Why would access think that
these 2 amounts do not equal zero, even though it shows zero?
If I format the difference field as General Number it returns:
-1.45519152283669E-11
Jerry Whittle - 13 Mar 2008 20:12 GMT
That works out to -0.0000000000145519152283669 which is a very tiny number.
There probably is a very small difference between the two especially as at
least one of them are a calculated field.

It's a Floating Point Math Problem that many computers have. For example in
Access and some other programs 3.1 - 3.11  =  -9.99999999999979E-03  which is
not the same as -0.01 as we know it.

You could change your criteria to something like < -0.0000001 OR > 0.0000001
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> woI am comparing amounts in tow fields:Billing Difference:
> IIf([SumOfAmt]>[AmountEst],[AmountEst]-[SumOfAmt]), which gave a lots of
[quoted text clipped - 5 lines]
> If I format the difference field as General Number it returns:
> -1.45519152283669E-11
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.