-- 作者:outcat
-- 发布时间:2018/1/23 13:16:00
-- 数据导入
此主题相关图片如下:112.png

我要在上图的订单明细表中,当欠货数量=0,就不要显示了,写了下面的代码,出错了
AfterLoad代码
DataTables("供应商订货总表").loadfilter = "核销 = false and 供应商名称 = \'" & Tables("供应商回货总表").Current("供应商名称") & "\'"
DataTables("供应商订货总表").load
If Tables("供应商订货总表").Current IsNot Nothing Then
Dim r As Integer
r= DataTables("客户订货明细表").Current("(欠货数量)","订货单号 = \'" & Tables("客户订货总表").Current("订货单号") & "\'")
DataTables("供应商订货明细表").loadfilter = " r > 0 And 供应商名称 = \'" & Tables("供应商订货总表").Current("供应商名称") & "\'"
DataTables("供应商订货明细表").load
Else
DataTables("供应商订货明细表").loadfilter = "供货商名称 Is null"
DataTables("供应商订货明细表").load
End If
|