以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  格式对吗  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=150575)

--  作者:nbsugu_z
--  发布时间:2020/6/2 14:23:00
--  格式对吗
Dim dr4 As DataRow
            Dim dr3 As DataRow
            dr4 = DataTables("wy_gt0").Find("[bz1] = \'4\'and [yy] = \'" & e.DataRow("yy") & "\'and [yy1] = \'" & e.DataRow("yy1") & "\'")
            dr3 = DataTables("wy_gt0").Find("[bz1] = \'3\'and [yy] = \'" & e.DataRow("yy") & "\'and [yy1] = \'" & e.DataRow("yy1") & "\'")
            If dr4 IsNot Nothing Or  dr3 IsNot Nothing Then
                e.DataRow("zds") = dr4("gtds1")-dr3("gtds1")
                e.DataRow("tds") = round2((e.DataRow("zds")* e.DataRow("tmj")/e.DataRow("zmj")),2)
                e.DataRow("tje") = round2(e.DataRow("tds")*e.DataRow("tdj"),2)
            End If


以上代码中If dr4 IsNot Nothing Or  dr3 IsNot Nothing Then写法对吗?老是提示未把对象....实例什么的

--  作者:有点蓝
--  发布时间:2020/6/2 14:50:00
--  
If dr4 IsNot Nothing andalso  dr3 IsNot Nothing Then