分别在每个表的datacolchanged加入下面的代码
参考
http://www.foxtable.com/help/topics/2490.htm
Select Case e.DataCol.name
Case "取样日期", "取样时间"
If e.DataRow.IsNull("取样日期") = False AndAlso e.DataRow.IsNull("取样时间") = False Then
Dim filter As String = "取样日期 = #" & e.DataRow("取样日期") & "# and 取样时间 = '" & e.DataRow("取样时间") & "'"
Dim fdr As DataRow = DataTables("溶液站输出").Find(filter)
If fdr Is Nothing Then
fdr = DataTables("溶液站输出").AddNew
fdr("取样日期") = e.DataRow("取样日期")
fdr("取样时间") = e.DataRow("取样时间")
End If
DataTables("溶液站输出").DataCols("取样日期").RaiseDataColChanged(fdr)
End If
End Select