If Forms("窗口1").Opened = True Then Dim t As Table = Tables("窗口1_Table2") If t.Cols.Contains("RA") = False Or e.Table.Current Is Nothing Then Return End If
SystemReady = False Try For Each r As Row In t.Rows Dim FilledDr As DataRow = DataTables("D").Find("Code = '" & r("Code") & "' and BID = '" & e.Table.Current("ID") & "'") If FilledDr IsNot Nothing Then r("RA") = FilledDr("A") Else ' Dim Dr As DataRow = DataTables("表C").Find("Code = '" & r("Code") & "'") ' If dr IsNot Nothing Then If r("IsUse") = True Then r("RA") = 999 Else r("RA") = 0 End If ' End If End If Next Catch ex As Exception MessageBox.Show("追加数据失败") End Try SystemReady = True t.ResumeRedraw End If