Foxtable(狐表)用户栏目专家坐堂 → 有关error的问题


  共有3697人关注过本帖树形打印复制链接

主题:有关error的问题

帅哥哟,离线,有人找我吗?
myzzip
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:159 积分:1283 威望:0 精华:0 注册:2013/5/15 14:11:00
有关error的问题  发帖心情 Post By:2013/12/12 12:13:00 [只看该作者]

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

 

代码报错 怎么回事,帮忙看看哪写错啦!


 回到顶部
帅哥哟,离线,有人找我吗?
Bin
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:35433 积分:178524 威望:0 精华:3 注册:2013/3/30 16:36:00
  发帖心情 Post By:2013/12/12 12:21:00 [只看该作者]

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 If

end if


 回到顶部