以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]字符串写法?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=173707)

--  作者:2425004926
--  发布时间:2021/12/13 10:28:00
--  [求助]字符串写法?
老师,请问红色部分代码应怎么写,下面两种情况我都试了一下,都出错
nd.Text = nd.text & "(" & dt.Compute("Count(" & "[" & sz2(0) & "]" & ")","[" & xt & "] = \'" & ly & "\'") & ")" 
nd.Text = nd.text & "(" & dt.Compute("Count(" & sz2(0) & ")","[" & xt & "] = \'" & ly & "\'") & ")"  

--  作者:有点蓝
--  发布时间:2021/12/13 10:37:00
--  
出什么错?
--  作者:2425004926
--  发布时间:2021/12/13 10:37:00
--  
 明白了,这个是正确的,是其它代码没置好
nd.Text = nd.text & "(" & dt.Compute("Count(" & sz2(0) & ")","[" & xt & "] = \'" & ly & "\'") & ")"