以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  增加计算条件后异常  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=132677)

--  作者:有点甜
--  发布时间:2019/3/27 11:34:00
--  

修改

 

Arys = DataTables("出入库明细").SQLGetValues("月|成品编码","月 = \'" & e.Form.Controls("月").Text & "\' and 月 is not null and 成品编码 is not null")

 

学会自己调试 http://www.foxtable.com/webhelp/scr/1485.htm

 

[此贴子已经被作者于2019/3/27 14:57:52编辑过]

--  作者:有点甜
--  发布时间:2019/3/27 14:58:00
--  

改一下

 

Arys = DataTables("出入库明细").SQLGetValues("月|成品编码","月 = \'" & e.Form.Controls("月").Text & "\' and 月 is not null and 成品编码 is not null")


--  作者:有点甜
--  发布时间:2019/3/27 21:41:00
--  

根据日期条件查找到对应的数据,然后引用。比如合成条件,如

 

"月 = \'201902\'"

 

 

"月 = \'" & format(date.today.addmonths(-1), "yyyyMM") & "\'"