以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  设置成下拉式列的数据如何复制到下行  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=105992)

--  作者:13861676007
--  发布时间:2017/8/30 17:04:00
--  设置成下拉式列的数据如何复制到下行
   凭证录入表的摘要列,在项目属性AFTEROPENJECT中被设置成下拉式窗口列,Tables("凭证录入表").Cols("摘要").DropForm ="凭证录入辅助摘要下拉窗口"
在该表DATACOLCHANGED 属性中有如下代码:
If e.DataCol.name = "借方金额" Then
    Dim s As Double = e.DataTable.Compute("sum(借方金额)")
    Forms("凭证录入").Controls("Lab借方合计").text = format(s,"###,###,###,##0.00")
    If e.NewValue <> 0 Then
        e.DataRow("贷方金额") = 0
        Dim c1 As String = e.DataRow("摘要") \'找出当前行摘要
        Tables("凭证录入表").Position = Tables("凭证录入表").Position+1
        Tables("凭证录入表").Select(Tables("凭证录入表").rowsel,Tables("凭证录入表").Cols("摘要").Index)
        e.DataRow("摘要") = c1 
’        Forms("凭证录入辅助摘要下拉窗口").DropDownBox.Value = c1 \'Exception has been thrown by the target of an invocation.
     End If
End If


其中  第9行    e.DataRow("摘要") = c1 \'该行想将上行摘要移入下行,但该行还是显示空白
      Forms("凭证录入辅助摘要下拉窗口").DropDownBox.Value = c1   ‘用该行代码替代出现Exception has been thrown by the target of an invocation.错误信息

请教如何编制代码?

--  作者:有点甜
--  发布时间:2017/8/30 17:09:00
--  
 你的代码写得十分错乱。直接说,你做什么操作以后,要达到什么效果,用实例说明。
--  作者:13861676007
--  发布时间:2017/8/30 17:23:00
--  
 凭证录入表的摘要列,在项目AFTEROPENJECT中被设置成下拉式窗口列,按回车键转入下一列时,将摘要中内容复制到下一列,如何操作?


--  作者:有点甜
--  发布时间:2017/8/30 17:34:00
--  
if e.datacol.name = "摘要" Then
    Dim fdr As DataRow = e.DataTable.find("_Identify > " & e.DataRow("_Identify"), "_Identify")
    If fdr IsNot Nothing Then
        fdr("摘要") = e.DataRow("摘要")
    End If
End If

--  作者:13861676007
--  发布时间:2017/8/30 17:36:00
--  
在表属性DATACOLCHANGED中, 用Dim c1 As String = e.DataRow("摘要") \'找出当前行摘要,用 Tables("凭证录入表").Position = Tables("凭证录入表").Position+1转入下一行,
 想用e.DataRow("摘要") = c1 代码实现目的,摘要中不能显示数据,请教

--  作者:有点甜
--  发布时间:2017/8/30 18:12:00
--  
请用4楼代码。