导入材料明细 表的,当前行,事件。写入如下。
当点击 导入材料.导入材料明细" 表,切换当前行时,如果 dr.IsNull("定额编码")=False 。
调试会弹出,0,1 的循环。无法退出。
If Forms("导入材料").Opened AndAlso Forms.ActiveForm.Name = "导入材料" Then
Dim dr As Row = Tables("导入材料.导入材料明细").Current
MessageBox.show(0)
If dr IsNot Nothing AndAlso dr.IsNull("定额编码")=False Then
Dim i As Integer= Tables("材料").FindRow("定额编码 = '" & dr("定额编码") & "'")
If i >= 0 Then
MessageBox.show(1)
Tables("材料").Position = i
End If
End If
End If