Hello, I am posting this SUM again because I did not see the first one appear. Numerous more people have sent me replies. I had already solved the problem so I have not tried them all and won't list them all here. Thank you all for your replies. Don Cain from ESRIUK did say that this is a limitation of the string.AsNumber request. The original post is below. Thanks to Raj Dutt in London who helped me figure out that this is a possible bug in ArcView. I had a group of textlines in a dialog and when a button was clicked it would add up the values from text lines and then checkthat the values added up to 100. The problem was that sometimes the value from the text line would be '9.99'. But in reality ArcView was evaluating it as maybe 9.990000000000100 (Why, I don't know - this is the bug). So when I added up and checked to see if the value was 100 it might look like 100.0000 when in actuality it was 100.000000000000001. To solve this problem Raj suggested the following logic and it seems to work. if(finalVal > 100)then if((finalVal - 100) < 0.01)then Msgbox.info("OK","") else MsgBox.Error end elseiff(finalVal < 100)then if((100 - FinalVal) < 0.01)then Msgbox.info("OK","") else MsgBox.Error end else Msgbox.info("OK","") end my original post was: Hello, I am at a complete loss. I have a dialog with about 25 textlines. I have a button that I click and it gets the values from the text lines and then adds up the values after using the .AsNumber request. It then checks whether these values add up to 100. If not it gives an error message. The problem is sometimes (not all the time) even when it adds up to 100 it still evaluates to not equal to 100 and gives an error message. The code is below. Can anybody think of a reason why sometimes it will evaluate to not equalling 100 even when it does equal 100? arableValue = f2Val.AsNumber + f3Val.AsNumber + f4Val.AsNumber + f5Val.AsNumber + f6Val.AsNumber + f7Val.AsNumber + f8Val.AsNumber + f9Val.AsNumber + f10Val.AsNumber + f11Val.AsNumber + f12Val.AsNumber + f13Val.AsNumber + f14Val.AsNumber + f15Val.AsNumber + f16Val.AsNumber + f17Val.AsNumber + f18Val.AsNumber + f20Val.AsNumber + f23Val.AsNumber + f22Val.AsNumber + f21Val.AsNumber + f19Val.AsNumber msgBox.Info(arableValue.AsString, "") if (arableValue <> 100) then wrongTotal = "The arable values do not add up to 100%. The total you have is"++arableValue.AsString+"%. "+ "Please correct so the values add up to 100%." msgBox.Error(wrongTotal, "Incorrect Arable Proportions") end John DeGroote GIS and Data Services The Macaulay Institute Craigiebuckler Aberdeen Scotland UK AB15 8QH Tel: +(44) (0) 1224 498200 Fax: +(44) (0) 1224 311556 email: j.degroote@macaulay.ac.uk http://macaulay.ac.uk