Dim Filter As String With e.Form.Controls("物料编码") If .Value IsNot Nothing Then Filter = "物料编码 like '%" & .Value & "%'" End If End With With e.Form.Controls("供应商") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "供应商 = '" & .Value & "'" End If End With With e.Form.Controls("物料名称") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "物料名称 like '%" & .Value & "%'" End If End With With e.Form.Controls("规格型号") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "规格型号 like '%" & .Value & "%'" End If End With If filter > "" Then DataTables("物料信息表").LoadFilter = Filter DataTables("物料信息表").load() End If
|