Dim Filter As String
With e.Form.Controls("DropBox1")
If .Value IsNot Nothing Then
Filter = "内部加工单号 in ('" & .Value.replace(",","','") & "')"
End If
End With
With e.Form.Controls("combobox1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "工段 = '" & .Value & "'"
End If
End With
With e.Form.Controls("DropBox3")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "产品名称 = '" & .Value & "'"
End If
End With
If Filter > "" Then
DataTables("工序库调用_Table1").LoadFilter = Filter '设置加载条件
DataTables("工序库调用_Table1").Load()
End If
Dim cmd1 As New SQLCommand
Dim dt As DataTable
cmd1.C
cmd1.CommandText = "SE LECT * From {派工明细表} Where filter" 这里的语句应该怎么写。
dt = cmd1.ExecuteReader()
红色部分where 后边的如何写。用了集中办法都不行。是不是上边的这句 Filter = "内部加工单号 in ('" & .Value.replace(",","','") & "')" 定义不行。