Dim flt As String = "1 = 1" Dim t As Table = Tables("石材信息表") For Each s As String In "品种|厚度|是否规格板".Split("|") If e.Form.Controls(s).Value <> Nothing Then If t.Cols(s).IsNumeric Then flt + = " And " & t.Cols(s).Name & " = " & e.Form.Controls(s).Value Else flt + = " And " & t.Cols(s).Name & " = '" & e.Form.Controls(s).Value & "'" End If End If Next If e.Form.Controls("编号").Value = Nothing Then t.Filter = flt Else t.Filter = flt & " And 编号 Like '*" & e.Form.Controls("编号").Value & "*'" End If
|