spikepl
Eledittingent Beliped
- Local time
- Today, 14:16
- Joined
- Nov 3, 2010
- Messages
- 6,134
For floating-point numbers (i.e numbers with decimals) you can only use the equal sign for comparison IF the field/variables is declared as Currency (withing 4 decismals9 . Otherwise, you can never use the equal sign for comparison. To find out if two real numbers are "equal", the test is
If Abs(MyNumber-NumberToCompareWith) <SomeVerySmallNumberGiovenByPrecisionDesired Then
' they are equal
ENd IF
If Abs(MyNumber-NumberToCompareWith) <SomeVerySmallNumberGiovenByPrecisionDesired Then
' they are equal
ENd IF