Dim filter As StringDim sts() As String = {"合同号","客户名称","业务员","长度","宽度","厚度","原料产地"}For Each st As String In sts Dim val As String = e.Form.Controls(st).value If val > "" Then val = val.Replace("*","[*]")if TTables("销售合同基础表").cols(st).IsNumeric then
st = "convert(" & st & ",'System.String')"
end if
If filter = "" Then
filter = st & " like '*" & val & "*'"
Else
filter = filter & " and " & st & " like '*" & val & "*'"
End If
End If
Next