雇员Enter事件:
Dim cp As WinForm.ComboBox = e.Form.Controls("产品")
Dim kh As WinForm.ComboBox = e.Form.Controls("客户")
Dim gy As WinForm.ComboBox = e.Form.Controls("雇员")
If kh.Text > ""
gy.ComboList = DataTables("订单").GetComboListString("雇员","产品 = '" & cp.Text & "'And 客户 = '" & kh.Text & "'")
Else
gy.ComboList = DataTables("订单").GetComboListString("雇员","产品 = '" & cp.Text & "'")
End If
查询按钮事件:
Dim ss1() As String = {e.Form.Controls("产品").text,e.Form.Controls("雇员").text,e.Form.Controls("客户").text}
Dim ss2() As String = {"产品","雇员","客户"}
Dim s As String
For i As Integer = 0 To ss1.Length - 1
If ss1(i)>""
s += " and " & ss2(i) & "='" & ss1(i) & "'"
End If
Next
Tables("订单").Filter = mid(s,5)