Dim ids As String = DataTables("父表").GetComboListString("id", "条件")ids = ids.Replace("|", "','")Dim sum As Double = DataTables("子表").compute("sum(数量)", "id in ('" & ids & "')")msgbox(sum)