以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  GetComboListString能不能获取两个字段  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=120214)

--  作者:yjf123
--  发布时间:2018/6/9 23:17:00
--  GetComboListString能不能获取两个字段
GetComboListString能不能获取两个字段唯一值
--  作者:有点甜
--  发布时间:2018/6/10 23:06:00
--  
以下是引用yjf123在2018/6/9 23:17:00的发言:
GetComboListString能不能获取两个字段唯一值

 

不可以,需要用代码处理。

 

Dim ls1 As List(Of String) = DataTables("表A").GetValues("第一列")
Dim ls2 As List(Of String) = DataTables("表B").GetValues("第一列")
For Each s As String In ls2
    If ls1.Contains(s) = False Then
        ls1.add(s)
    End If
Next

msgbox(String.Join("|", ls1.ToArray))