请看看可以实现吗?
多条件,多列 模糊查询
.NET Framework 版本:2.0.50727.8670
Foxtable 版本:2017.8.18.1
错误所在事件:窗口,橡胶圈入库,Button1,Click
详细错误信息:
从字符串“背番号 Like '*427*'”到类型“Long”的转换无效。
输入字符串的格式不正确。
出错?
Dim Filter As String
With e.Form.Controls("TextBox1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = "背番号 Like '*" & .Value & "*'" Or "管理号码 Like '*" & .Value & "*'" Or " 产品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 & "日期<= #" & .Value & "#"
End If
End With
If Filter > "" Then
Tables("入库1").Filter = Filter
End If
[此贴子已经被作者于2017/8/22 11:21:28编辑过]