以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]目录树筛选不起作用 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=89749) |
-- 作者:adidas5241 -- 发布时间:2016/8/29 11:00:00 -- [求助]目录树筛选不起作用 建窗口(名:添加商品),里面有表(商品目录)和临时建立的目录树,目录树的AfterSelectNode代码如下: Dim FullPath As String = e.Node.FullPath If e.Node.Text = "全部分类" Then Tables("商品目录").Filter = "" Else Tables("商品目录").Filter = "类别ID Like\'" & GetPy(FullPath,True) & "*\'" End If 点击任何一个节点,商品目录表都显示全部内容,与打开表时一样
|
-- 作者:大红袍 -- 发布时间:2016/8/29 11:10:00 -- Tables("商品目录")
改成
Forms("窗口名").Controls("Table1").Table |
-- 作者:adidas5241 -- 发布时间:2016/8/29 12:42:00 -- 谢谢老师,修改后OK!再请教一下,如下图,为什么我在表控件属性选择了复选框,预览是就是没有复选框呢?我想做一个多选录入。 [此贴子已经被作者于2016/8/29 12:49:12编辑过]
|
-- 作者:大红袍 -- 发布时间:2016/8/29 15:04:00 -- 属性那里->显示行号列,设置成true |
-- 作者:adidas5241 -- 发布时间:2016/8/29 15:52:00 -- 谢谢,OK。麻烦再看看下面的代码: Dim tba As Table = Forms("添加商品").Controls("Table1").Table For Each r As Row In tba.GetCheckedRows Dim nma() As String = {"商品编号","商品名称","规格型号","等级","计量单位","单片重量"} \'A表数据来源列 Dim nmb() As String = {"商品编号","商品名称","规格型号","等级","单位","片重"} \'B表数据接收列 Dim tbb As Table = Forms("销售订单").Controls("订单明细").Table Dim dr As DataRow = tbb("销货订单.销货订单明细").AddNew For i As Integer = 0 To nma.Length - 1 dr(nmb(i)) = r(nma(i)) Next Next Forms("添加商品").close 编译错误:AddNew 不是“Row”成员 改成以下代码后,在“销货订单明细”里增加了选择行,但是窗口表“订单明细.销货订单明细”这个关联表没有任何数据 Dim tba As Table = Forms("添加商品").Controls("Table1").Table For Each r As Row In tba.GetCheckedRows Dim nma() As String = {"商品编号","商品名称","规格型号","等级","计量单位","单片重量"} \'A表数据来源列 Dim nmb() As String = {"商品编号","商品名称","规格型号","等级","单位","片重"} \'B表数据接收列 \'Dim tbb As Table = Forms("销售订单").Controls("订单明细").Table Dim dr As DataRow = DataTables("销货订单明细").AddNew For i As Integer = 0 To nma.Length - 1 dr(nmb(i)) = r(nma(i)) Next Next Forms("添加商品").close [此贴子已经被作者于2016/8/29 19:24:31编辑过]
|