出现一楼的结果,原因是:其他筛选都是针对Table的,独『重复筛选』是针对DataTable!
本人觉得『重复筛选』也应该针对Table为好,大家认为呢?
一楼的要求可这样:
With Tables("订单")
Dim Khs,T As String
for each r as Row In .Rows
if Khs is Nothing orelse Khs.Indexof(r("客户")) = -1 then
T = T & " or [_Identify] = " & r("_Identify")
Khs = Khs & "|" & r("客户")
End If
Next
.Filter = T.Substring(4)
.Sort = "客户"
End with