代码改成比如
Dim filter as string = "1=1"
Dim n1 as string = 1
If n1 <> Nothing then
filter &= " and (a='" & n1 & "' or b='" & n1 & "' or c='" & n1 & "')"
End If
Dim n2 as string = 2
If n2 <> Nothing then
filter &= " and (a='" & n2 & "' or b='" & n2 & "' or c='" & n2 & "')"
End If
msgbox(filter)