在帮助中有一个查询窗口。Dim Filter As
String
With
e.Form.Controls("cmbProduct")
If .Value IsNot
Nothing
Then
Filter =
"产品 =
'" &
.Value & "'"
End
If
End
With
With
e.Form.Controls("cmbCustomer")
If .Value IsNot
Nothing
Then
If Filter > ""
Then
Filter =
Filter & " And "
End
If
Filter = Filter
& "客户 = '" & .Value
& "'"
End
If
End
With
上边的条件第一个如果 产品不是等于一个如: 产品等于 "pd001,pd002,pd003,..."中的任何一个都可以。
语法怎么写
这样写不对, 这里这个条件应该怎么用。 Filter = "产品 in '" & .Value.replace(",","','")& "'"