以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  无法在 System.Int32 和 System.String 上执行“=”操作。  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=125081)

--  作者:yetle
--  发布时间:2018/9/19 15:48:00
--  无法在 System.Int32 和 System.String 上执行“=”操作。
Tables("选择物料需求_table1").Filter = "[物供号] = \'" & Tables("下采购订单_table1").current("物供号") & "\'And [审核2] = \'True\' and [最终应订数]>[订料数]" 标记黄色这里应该有问题,该怎么写
--  作者:有点甜
--  发布时间:2018/9/19 17:34:00
--  

1、[最终应订数] 和 [订料数] 都要是数值列;

 

2、如果你[物供号]列是数值列,要改成 val(Tables("下采购订单_table1").current("物供号"))


--  作者:yetle
--  发布时间:2018/9/19 17:48:00
--  

1、[最终应订数] 和 [订料数] 都是数值列;

 

2、[物供号]列是数值列,在其他窗口这么写也是OK的,另外,改成 val(Tables("下采购订单_table1").current("物供号")),还是有这个提示


--  作者:有点甜
--  发布时间:2018/9/19 18:03:00
--  

改成这样

 

Tables("选择物料需求_table1").Filter = "[物供号] = \'" & val(Tables("下采购订单_table1").current("物供号")) & "\' And [审核2] = True and [最终应订数]>[订料数]"

 

如果还提示报错,去看看你currentChanged事件代码,那里应该有错。