参考:http://www.foxtable.com/webhelp/scr/0617.htm
大概类似
If e.Col.Name = "长跑" Then '如果正在输入的是折扣列
If e.Text > "" Then '如果已经输入内容
Dim ar() As String = e.Text.split(".")
If ar.Length = 2 Then
Dim v1 As Double = Val(ar(0)) '将输入的内容转换为数值
If v1 > 8 OrElse v1 < 2 Then '如果输入的值大于0.15
e.Cancel = True '则禁止退出编辑模式
Else
Dim v2 As Double = Val(ar(1)) '将输入的内容转换为数值
If v2 > 60 OrElse v1 <= 0 Then '如果输入的值大于0.15
e.Cancel = True '则禁止退出编辑模式
End If
End If
Else
e.Cancel = True '则禁止退出编辑模式
End If
End If
End If