以文本方式查看主题

-  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=113001)

--  作者:outcat
--  发布时间:2018/1/6 16:39:00
--  赋值
 请教一下,我这个当r等于0了,dr1("核销") = True却不执行,

If 图片点击可在新窗口打开查看e.DataCol.Name = "未回数量" Then
    Dim r As Integer
    r=Tables("供应商订货总表").Current("未回数量") = DataTables("供应商订货明细表").Compute("sum(欠货数量)","票号 = \'" & Tables("供应商订货明细表").Current("票号") & "\'")
    If r =0 Then
        Dim dr1 As DataRow
        dr1 = DataTables("供应商订货总表").Find("票号 = \'" & e.DataRow("票号") & "\'")
        If dr1 IsNot Nothing Then
            dr1("核销") = True
        End If
    End If
End If 

--  作者:有点蓝
--  发布时间:2018/1/6 16:42:00
--  
If 图片点击可在新窗口打开查看e.DataCol.Name = "未回数量" Then
    Dim r As Integer
    r= DataTables("供应商订货明细表").Compute("sum(欠货数量)","票号 = \'" & Tables("供应商订货明细表").Current("票号") & "\'")
    If r =0 Then
        Dim dr1 As DataRow
        dr1 = DataTables("供应商订货总表").Find("票号 = \'" & e.DataRow("票号") & "\'")
        If dr1 IsNot Nothing Then
            dr1("核销") = True
        End If
    End If
End If