Dim dl As WinForm.TextBox = e.Form.Controls("大类")
Dim cj As WinForm.ComboBox = e.Form.Controls("厂家")
Dim zl As WinForm.ComboBox = e.Form.Controls("中分类")
Dim ff As WinForm.TextBox = e.Form.Controls("使用方法")
Dim mc As WinForm.TextBox = e.Form.Controls("名称")
Dim gys As WinForm.TextBox = e.Form.Controls("供应商")
Dim db As WinForm.ComboBox = e.Form.Controls("加入对比")
Tables("兽药").Filter = "( 大类 Like '*" & dl.text &"*' OR 大类 is null ) and (厂家 like '*" & cj.text & "*' OR 厂家 is null ) And ( 中分类 Like '*" & zl.text &"*' OR 中分类 is null ) And ( 使用方法 Like '*" & ff.text & "*' OR 使用方法 is null) and (名称 like '*" & mc.text & "*' OR 名称 is null) and (供应商 like '*" & gys.text & "*'OR 供应商 is null)"
是不是有更简单的方法?我这个写的是不是有点复杂了。