Dim r As Row = Tables("表a").current dim has as boolean = false Dim drs As List(Of DataRow) = r.DataRow.GetChildRows("子表名") For Each dr As DataRow In drs If dr("类型") = "ABC" Then has = True Exit For End If Next If has Then msgbox(1) Else msgbox(2) End If