我重复执行下面代码,没问题
If Relations.Contains("po") Then Relations.Delete("po")End If
Dim ParentCol(1) As DataColDim ChildCol(1) As DataColParentCol(0) = DataTables("表A").DataCols("第一列")ParentCol(1) = DataTables("表A").DataCols("第二列")ChildCol(0) = DataTables("表B").DataCols("第一列")ChildCol(1) = DataTables("表B").DataCols("第二列")Relations.Add("po", ParentCol, ChildCol)msgbox(1)