开始是根据厂家、物资名称、物资类别、型号、规格来进行查找,后面我想要只根据其中一项就进行查找,但是我输入最后两行代码后发现,只有其中一项可以实现,另一项就不能实现了,是不是代码结束那里编错了?
Dim cj As WinForm.ComboBox = e.Form.Controls("厂家")
Dim wzmc As WinForm.ComboBox = e.Form.Controls("物资名称")
Dim wzlb As WinForm.ComboBox = e.Form.Controls("物资类别")
Dim xh As WinForm.ComboBox = e.Form.Controls("型号")
Dim gg As WinForm.ComboBox = e.Form.Controls("规格")
Tables("项目录入表").Filter="厂家 = '" & cj.Text & "' and 物资名称 = '" & wzmc.Text & "' and 物资类别 like '*" & wzlb.Text & "*' and 型号 like '*" & xh.Text & "*' and 规格 like '*" & gg.Text & "*'"
Tables("项目录入表").Filter="厂家 like '*" & cj.Text & "*'"
Tables("项目录入表").Filter="物资名称 like '*" & wzmc.Text & "*'"