以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  自定义录入界面之一的改进  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=80937)

--  作者:kaituozhe
--  发布时间:2016/2/13 10:27:00
--  自定义录入界面之一的改进

在帮助的自定义录入界面之一中原代码 只能在凭证明细中使用,但是实际输入时一般都是在关联表使用,为此我设计了以下代码,但是实现不了目的,是什么原因,该怎么改进?

Dim tbl As Table = Tables("核算项目选择_Table1")
If tbl.Current IsNot Nothing Then
     Select Case e.Table.name
            Case "凭证明细"
                Tables("凭证明细").Current("项目编号") = tbl.Current("项目编号")
                Tables("凭证明细").Current("核算项目") = tbl.Current("项目名称")
            Case "会计凭证.凭证明细"
                Tables("会计凭证.凭证明细").Current("项目编号") = tbl.Current("项目编号")
                Tables("会计凭证.凭证明细").Current("核算项目") = tbl.Current("项目名称")
        End Select
End If
Forms("核算项目选择").Close()


--  作者:Hyphen
--  发布时间:2016/2/13 11:39:00
--  
这里 e.Table是 :Tables("核算项目选择_Table1")

参考自定义录入界面之二:http://www.foxtable.com/help/topics/2116.htm
改成下拉窗口