以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]Nothing 疑问  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=173598)

--  作者:wangjh8888
--  发布时间:2021/12/7 13:44:00
--  [求助]Nothing 疑问
老师好
下面代码,为什么结果都是true?

Dim t As Table = e.Form.controls("Table-1").Table 
t.current("DDBL2") =Nothing 
msgbox(t.current("DDBL2") IsNot Nothing )


Dim t As Table = e.Form.controls("Table-1").Table 
t.current("DDBL2") =123
msgbox(t.current("DDBL2") IsNot Nothing )

如何正确判断 t.current("DDBL2")是否为nothing?或者是数字?

--  作者:有点蓝
--  发布时间:2021/12/7 13:53:00
--  
使用isnull:http://www.foxtable.com/webhelp/topics/0595.htm


--  作者:wangjh8888
--  发布时间:2021/12/7 15:53:00
--  
一:
    If  dr.Isnull("DDBL2") =False Then  \'标杆点 RS(0) =0

    Else

    End If

二:
    dr = dt.Find("dr.Isnull(\'DDBL2\') =False" )


老师 一:代码没有问题,要完成二代码的意图,代码应该怎么写?


--  作者:有点蓝
--  发布时间:2021/12/7 15:55:00
--  
表达式里要这样用:http://www.foxtable.com/webhelp/topics/2055.htm

dr = dt.Find("DDBL2 is not null" )