B
badger
I have a simple calculation that is performed on a form
when a button is pressed. Essentially, the value of
List52.Value is compared to the value of List47. Both
values are type long integer, but about every fifth time,
(even if I use the exact same numbers in each combo box
each time!?!) the comparison is made inaccurately, and
(for example) 1000 is declared to be less than 100. I
actually tested this with 1000 and 100, and it randomly
fails the comparison about every fifth time I hit the
button. Any ideas why this would happen?
If List52.Value > List47.Value Then
MsgBox "Cannot add this item. This order is
shipping more than was requested."
List52.Value = 0
List47.Value = 0
End If
when a button is pressed. Essentially, the value of
List52.Value is compared to the value of List47. Both
values are type long integer, but about every fifth time,
(even if I use the exact same numbers in each combo box
each time!?!) the comparison is made inaccurately, and
(for example) 1000 is declared to be less than 100. I
actually tested this with 1000 and 100, and it randomly
fails the comparison about every fifth time I hit the
button. Any ideas why this would happen?
If List52.Value > List47.Value Then
MsgBox "Cannot add this item. This order is
shipping more than was requested."
List52.Value = 0
List47.Value = 0
End If