For Each
s = "," + CStr(r("_Identify"))
else
s = "_Identify in " + "(" + CStr(r("_Identify"))
end if Next
if s > ""
s = s + ")"
Tables("添加入库购品代码_物料代码表").Filter = s
end if
没有很多时间去优化以上,但是应该可以实现你的要求