参考代码
Dim filter As String = Tables("表A").filterDim str As String = "新条件"filter = iif(filter>"", "(" & filter & ") and ", "") & strmsgbox(filter)