Dim kh As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim kh2 As WinForm.ComboBox = e.Form.Controls("ComboBox2")
Dim kh3 As WinForm.ComboBox = e.Form.Controls("ComboBox3")
Dim kh4 As WinForm.ComboBox = e.Form.Controls("ComboBox4")
Dim kh5 As WinForm.ComboBox = e.Form.Controls("ComboBox5")
Dim Filter As String
With e.Form.Controls("ComboBox1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Dim srr() As String = e.Form.Controls("ComboBox1").Text.split("-")
Filter = "客户编号 = '" & srr(0) & "'and 面料名称 = '" & srr(1) & "'"
End If
End With
With e.Form.Controls("ComboBox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Dim syr1() As String = e.Form.Controls("ComboBox2").Text.split("-")
Filter = Filter & "色号 = '" & syr1(0) & "'and 颜色 = '" & syr1(1) & "'"
End If
End With
With e.Form.Controls("ComboBox4")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "款号 = '" & .Value & "'"
End If
End With
With e.Form.Controls("ComboBox5")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "交货单位 = '" & .Value & "'"
End If
End With
With e.Form.Controls("DateTimePicker1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "交货日期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("DateTimePicker2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "交货日期 <= #" & .Value & "#"
End If
End With
kh3.ComboList = DataTables("窗口3_Table1").sqlGetComboListString("品牌", Filter )