if e.Form.Controls("TextBox4").Text <> "" then
Dim n1 As Double = e.Form.Controls("NumericComboBox6").Value
Dim n2 As Double = Val(e.Form.Controls("TextBox4").Text)
If n1 >= n2 Then
e.Form.Controls("NumericComboBox6").Error = "取量要小于余量!" Else e.Form.Controls("NumericComboBox6").Error = "" End Ifend if