have two combo boxes on a form ~ each displays a row from a table, each row is defined "general" number.
the user is able to select numeric values from each combo box. when the user updates one of them, in the after update event, i evaluate the two combo boxes to ensure that the value in one is less than the value in the other.
this comparison is failing on certain conditions i do not understand.
example:
combo1 has the number 4 in it
combo2 has the number 18 in it
when i compare combo2 to combo1 to see if combo1 is greater than combo2, the compare fails as if the number 4 is greater than the number 18.
my code is as follows:
If (MinSpread.Column(1)) > (MaxSpread.Column(1))Then
(i do a message her if "minspread" is greater than "maxspread"
trouble is, if minspread has 18 in it and maxspread has 4 in it, the compare fails. (it only seems to work if minspread has a single digit number in it or the the two digit number has a value of 40 or greater.)
can someone help me with this sort of comparison logic ? (i have to make sure the number in minspread is less than the number in maxspread)
thanks !
Paul
the user is able to select numeric values from each combo box. when the user updates one of them, in the after update event, i evaluate the two combo boxes to ensure that the value in one is less than the value in the other.
this comparison is failing on certain conditions i do not understand.
example:
combo1 has the number 4 in it
combo2 has the number 18 in it
when i compare combo2 to combo1 to see if combo1 is greater than combo2, the compare fails as if the number 4 is greater than the number 18.
my code is as follows:
If (MinSpread.Column(1)) > (MaxSpread.Column(1))Then
(i do a message her if "minspread" is greater than "maxspread"
trouble is, if minspread has 18 in it and maxspread has 4 in it, the compare fails. (it only seems to work if minspread has a single digit number in it or the the two digit number has a value of 40 or greater.)
can someone help me with this sort of comparison logic ? (i have to make sure the number in minspread is less than the number in maxspread)
thanks !
Paul