here is my code in the interactivechange of a textbox using do case statement and
my problem is when i input "2.25" the messagbox on the button popup.
but the "2.25" is in the conditions above the otherwise.
is there wrong in the code?
my problem is when i input "2.25" the messagbox on the button popup.
but the "2.25" is in the conditions above the otherwise.
is there wrong in the code?
Code:
DO CASE
CASE this.Value="inc" OR this.Value="INC" OR this.Value="Inc" OR this.Value="Incomplete" OR this.Value="INCOMPLETE" OR this.Value="incomplete"
replace grade WITH "Inc"
thisform.grdTor_table.Refresh
CASE this.Value="drp" OR this.Value="DRP" OR this.Value="Drp" OR this.Value="Dropped" OR this.Value="DROPPED" OR this.Value="dropped"
replace grade WITH "Drp"
thisform.grdTor_table.Refresh
CASE val(this.Value ) = 5
replace grade WITH "5.00"
thisform.grdTor_table.Refresh
CASE val(this.Value) = 3 OR val(this.Value) = 3.0
replace grade WITH "3.00"
thisform.grdTor_table.Refresh
CASE val(this.Value) = 2.75
replace grade WITH "2.75"
thisform.grdTor_table.Refresh
CASE VAL(this.Value) =2.5 OR val(this.Value)=2.50
replace grade WITH "2.50"
thisform.grdTor_table.Refresh
CASE val(this.Value) =2.25
replace grade WITH "2.25"
thisform.grdTor_table.Refresh
CASE val(this.Value) = 2 OR val(this.Value)= 2.0
replace grade WITH "2.00"
thisform.grdTor_table.Refresh
CASE val(this.Value) =1.75
replace grade WITH "1.75"
thisform.grdTor_table.Refresh
CASE val(this.Value) = 1.5 OR val(this.Value)=1.50
replace grade WITH "1.50"
thisform.grdTor_table.Refresh
CASE VAL(this.Value)= 1.25
replace grade WITH "1.25"
thisform.grdTor_table.Refresh
CASE val(this.Value)=1 OR val(this.Value)<= 1.0
replace grade WITH "1.0"
thisform.grdTor_table.Refresh
OTHERWISE
MESSAGEBOX("Invalid Grade.",16,"Input error")
this.Value=""
RETURN
ENDCASE