'代码写在控件中,R05_RetailShipment为外部表(因为某些原因无法在表事件中写代码处理)
Dim dr As DataRow
dr = DataTables("R05_RetailShipment").SQLFind("outboundQuantity > 0 and outboundWagePrice=0")
If dr IsNot Nothing Then '如果找到符合条件的
MessageBox.Show(1)
Dim dr1 As DataRow
dr1 = DataTables("R05_RetailShipment").SQLFind("tableCode='R03_InboundProducts' Or tableCode='R03_Delegation' And (itemID = '" & dr("itemID") & "') and (number> '"&dr("number")&"') ")
If dr1 IsNot Nothing Then '如果找到符合条件的
MessageBox.Show(3)
dr("outboundWagePrice")=dr1("inboundWagePrice") '此行代码无效,求老师帮看下是什么原因
MessageBox.Show(4)
End If
Else
MessageBox.Show(2)
End If