在表“产品描述”列“订单号”中输入数字后,在表“用户1”、“用户2”列“订单号”中就出现相应的订单号。具体DataColChanged事件代码如下:
If e.DataRow("订单号").length > 0 Then
For Each dt As DataTable In DataTables
For Each xsdr As DataRow In DataTables("用户").DataRows
If dt.name = xsdr("用户名") Then
Dim ddhdr As DataRow = DataTables(dt.name).find("订单号 = '" & e.DataRow("订单号") & "'")
If ddhdr Is Nothing Then
ddhdr("订单号") = e.DataRow("订单号")
End If
End If
Next
Next
End If
运行过程中出现如图所示错误:
此主题相关图片如下:跨表输入报错图.png
查程序,应该是涂荧光的语句出现错误,但是不知道错在什么地方,如何改?
请高手帮助!!!
[此贴子已经被作者于2018/7/22 12:38:29编辑过]