Foxtable(狐表)用户栏目专家坐堂 → 设置成下拉式列的数据如何复制到下行


  共有1720人关注过本帖平板打印复制链接

主题:设置成下拉式列的数据如何复制到下行

帅哥哟,离线,有人找我吗?
13861676007
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:188 积分:1754 威望:0 精华:0 注册:2016/4/12 9:05:00
设置成下拉式列的数据如何复制到下行  发帖心情 Post By: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.错误信息

请教如何编制代码?

 回到顶部