If Tables("表C").Current IsNot Nothing Then Dim pr = Tables("父表").AddNew Tables("父表").save For Each r As Row In Tables("表C").Rows If r("第四列") > 0 Then Dim r1 As Row = Tables("子表").AddNew r1("单号") = pr("单号") r1("第一列") = r("第一列") r1("第二列") = r("第二列") r1("第三列") = r("第三列") r1("第四列") = r("第四列") r1.save
End If Next MessageBox.Show("ok","提醒") Tables("表C").save End If