代码如下:
Dim dr As DataRow
Dim dd As DataRow
Dim dc As DataRow
dr = DataTables("进货明细").Find("条码号 = '"& e.Form.Controls("combobox1").text & "'and 基本款号 = '" & e.Form.Controls("combobox2").text & "'")
dd= DataTables("销售表").find("条码号 = '"& e.Form.Controls("combobox1").text & "'and 基本款号 = '" & e.Form.Controls("combobox2").text & "'")
dc= DataTables("退货表").Find("条码号 = '"& e.Form.Controls("combobox1").text & "'and 退货款号 = '" & e.Form.Controls("combobox2").text & "'")
‘If dr IsNot Nothing And dd IsNot Nothing And dc IsNot Nothing Then
e.Form.Controls("label11").text = dr("件数") - dd("件数") -dc("件数")
用什么函数可以设置 ’销售表‘里找不到此行自动默认为0 ,同理‘退货表’ 也是一样,请问代码如何写?