以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  代码问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=171772)

--  作者:wangglby
--  发布时间:2021/9/8 21:24:00
--  代码问题
Dim id1 As Integer = Tables("表A").Rows(Tables("表A").TopPosition)("_Identify")
    Dim id2 As Integer = Tables("表A").Rows(Tables("表A").BottomPosition)("_Identify")
    If DataTables("表A").Compute("count(物料编码)"," 价格= 0.00 and [_Identify] >= " & id1 & " And [_Identify] <= " & id2 & " ") > 0 


这代码有问题吗 ,明明有符合条件的,就算不出来



--  作者:有点蓝
--  发布时间:2021/9/9 9:56:00
--  
调试看看
Dim id1 As Integer = Tables("表A").Rows(Tables("表A").TopPosition)("_Identify")
msgbox(id1)
    Dim id2 As Integer = Tables("表A").Rows(Tables("表A").BottomPosition)("_Identify")
msgbox(id2)
msgbox(DataTables("表A").Compute("count(物料编码)"," 价格= 0.00 "))
msgbox(DataTables("表A").Compute("count(物料编码)"," 价格 is null"))
msgbox(DataTables("表A").Compute("count(物料编码)"," 价格 is null and [_Identify] >= " & id1 & " And [_Identify] <= " & id2))
msgbox(DataTables("表A").Compute("count(物料编码)","[_Identify] >= " & id1 & " And [_Identify] <= " & id2))