If Tables("收购销售查询窗口_Table1").Cols(1).name = "猪主姓名" Then
Dim bh As WinForm.DateTimePicker = e.Form.Controls("日期查询")
Dim bb As WinForm.combobox = e.Form.Controls("猪主查询")
Dim cb As WinForm.textbox = e.Form.Controls("编号查询")
Dim dh As WinForm.textbox = e.Form.Controls("收购凭证号查询")
Tables("收购销售查询窗口_Table1").Filter= "日期 = '#" & bh.Text & "# ' And 猪主姓名 Like '*" & bb.Text & "*'and 编号 like '*" & cb.Text & "*' and 收购凭证号 like '*" & dh.Text & "*'"
Else
MessageBox.Show("请先加载收购!")
End If
上述代码不起作用?