以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  测试 查询按钮,但是有错误提示!无法在 System.Int32 和 System.String 上执行“Like”操作。  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=113694)

--  作者:amd12
--  发布时间:2018/1/21 11:28:00
--  测试 查询按钮,但是有错误提示!无法在 System.Int32 和 System.String 上执行“Like”操作。

.NET Framework 版本:2.0.50727.8689
Foxtable 版本:2017.12.18.1
错误所在事件:
详细错误信息:
无法在 System.Int32 和 System.String 上执行“Like”操作。

 

代码:

 

Dim sl As WinForm.ComboBox = e.Form.Controls("属类")
Dim pp As WinForm.ComboBox = e.Form.Controls("品牌")
Dim cpbh As WinForm.TextBox = e.Form.Controls("产品编号")
Dim cp As WinForm.TextBox = e.Form.Controls("产品")


Tables("库存").Filter="属类 = \'" & sl.Text & "\' and 品牌 like \'*" & pp.Text & "*\' and 产品编号 like \'*" & cpbh.Text & "*\' and 产品 like \'*" & cp.Text & "*\'"


以上代码是否有错误?


--  作者:有点甜
--  发布时间:2018/1/21 22:28:00
--  

1、正常de筛选按,应该这样做,参考

 

http://www.foxtable.com/webhelp/scr/1058.htm

 

2、可以不改代码,你把各个列的列类型,都改成字符即可 http://www.foxtable.com/webhelp/scr/0036.htm