Dim t As Table = Forms("诉讼文书").Controls("Table1").Table
Dim r2 As Row
For Each r As DataRow In DataTables("送达管理").Select("标注 = true") '添加勾选的行
Dim idx As Integer = t.FindRow("案号='" & r("案号") & "' and 分合 = '合'") '条件
If idx >= 0 Then
r2 = t.Rows(idx)
Else
r2 = t.AddNew
r2("案号") = r("案号")
r2("保管期限") = "永久"
r2("分合") = "合"
End If
r2.checked = True
r2("制作日期") = Date.Now
Next