以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- Getcombolist中使用变量可以吗?? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=98614) |
-- 作者:ylqfgj -- 发布时间:2017/4/2 14:04:00 -- Getcombolist中使用变量可以吗?? For Each str As String In DataTables("maintable").GetValues("projname","[combine] = 1") dr2 = DataTables("生成表").addnew dr2("projname") = str dr2("projcontent") = DataTables("maintable").GetComboListString("subprojcontent","[combine] = 1 and [projname] = str ",) Next 这段代码运行时,报错: 未找到列 [str]。 问题在于str是字符串变量,应该怎么处理,谢谢??
|
-- 作者:有点色 -- 发布时间:2017/4/2 14:52:00 -- For Each str As String In DataTables("maintable").GetValues("projname","[combine] = 1")
dr2 = DataTables("生成表").addnew
dr2("projname") = str
dr2("projcontent") = DataTables("maintable").GetComboListString("subprojcontent","[combine] = 1 and [projname] = \'" & str & "\' ")
Next
|