Enter("ComboBox8")
Dim kh2 As WinForm.ComboBox = e.Form.Controls("ComboBox8")
Dim Filter As String
With e.Form.Controls("ComboBox7")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
If .Value > "" AndAlso .Value.Contains("-") Then
Dim srr() As String = e.Form.Controls("ComboBox7").Value.split("-")
Filter = "客户编号 = '" & srr(0) & "'and 面料名称 = '" & srr(1) & "'"
Else
Filter = "客户编号 Like '" & .Value & "' Or 面料名称 Like '" & .Value & "'"
End If
End If
End With
kh2.ComboList = DataTables("窗口3_Table1").sqlGetComboListString("色号+'-' +颜色", Filter )
SelectedIndexChanged("ComboBox7")
Dim Filter As String
With e.Form.Controls("ComboBox7")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
If .Value > "" AndAlso .Value.Contains("-") Then
Dim srr() As String = e.Form.Controls("ComboBox7").Value.split("-")
Filter = "客户编号='" & srr(0) & "' And 面料名称='" & srr(1) & "'"
Else
Filter = "客户编号 Like '" & .Value & "' Or 面料名称 Like '" & .Value & "'"
End If
End If
End With
Tables("窗口3_Table1").Filter = filter
能不能帮我看看如何筛选
[此贴子已经被作者于2022/5/15 0:15:37编辑过]