参考代码
Dim cbx1 As WinForm.CheckedComboBox = e.Form.Controls("CheckedComboBox1")
Dim cbx2 As WinForm.CheckedComboBox = e.Form.Controls("CheckedComboBox2")
Dim cbx3 As WinForm.CheckedComboBox = e.Form.Controls("CheckedComboBox3")
Dim filter As String = "1=1"
If cbx1.Text > "" Then
filter &= " and 产品种类_产品大类 = '" & cbx1.text & "'"
End If
If cbx2.Text > "" Then
filter &= " and 供应商 = '" & cbx2.text & "'"
End If
If cbx3.Text > "" Then
filter &= " and 标记 = '" & cbx3.text & "'"
End If
msgbox(filter)
Tables("查询_采购关联").filter = filter
http://www.foxtable.com/webhelp/scr/1058.htm