i have no idea how to write code to display status automatically when the result is more than actual result. the situation is like this,user enter result in textbox, the status whether pass or fail will automatically display in a label status. it is possible to use javascript? i use vb.net with asp and access databasecode that i write in vb.net \[code\] sql = "SELECT * FROM Spec WHERE WheatType= '" & ddlType.SelectedValue & "' AND Category='1BK'" cmd = New OleDbCommand(sql, cnnOLEDB) cnnOLEDB.Open() Dim dr As OleDbDataReader dr = cmd.ExecuteReader() While dr.Read() Try If txtHB43S.Text >= dr("M_Min").ToString() And txtHB43S.Text <= dr("M_Max").ToString() Then stsHB43S.Text = "Pass" stsHB43S.ForeColor = System.Drawing.Color.Black ElseIf txtHB43S.Text = "" Then stsHB43S.Text = "" Else stsHB43S.Text = "Failed" stsHB43S.ForeColor = System.Drawing.Color.Red End If Catch ex As Exception Dim errorMsg As String = "Error" errorMsg += ex.Message Throw New Exception(errorMsg) Finally 'cnnOLEDB.Close() End Try End While\[/code\]