Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem summing up values

Status
Not open for further replies.

hansu

Programmer
Mar 12, 2002
89
In an access-program to manage the stock of products I retrieve the following fields from a table to get the remaining stock of a product:
QUANTITY, LENGTH. (And of course the primary key)

If for a certain LENGTH the same quantity has been booked out (negative values) as has been booked in (positive values) the expression Sum([QUANTITY]*[LENGTH]) should return 0.
Instead I receive often a small value like -1.11022E-16.
Any idea to solve this problem?

Datatypes are: QUANTITY = Long, LENGTH = Double.

Thanks for your assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top