Foxtable(狐表)用户栏目专家坐堂 → [求助]用窗口录入


  共有2071人关注过本帖树形打印复制链接

主题:[求助]用窗口录入

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


加好友 发短信
等级:小狐 帖子:374 积分:3277 威望:0 精华:0 注册:2018/1/12 10:54:00
[求助]用窗口录入  发帖心情 Post By:2018/5/17 9:53:00 [只看该作者]

我想用一个录入窗口在不同的表使用
If e.Selected Then '如果选择了值
    Dim tbl As Table = Tables("窗口4_Table1")
    If tbl.Current IsNot Nothing Then
        e.Form.DropDownBox.Value = tbl.Current("单位名称")
        If Tables("采购订单").Focused Then
            'If CurrentTable.Focus Then
            Tables("采购订单").Current("单位编号") = tbl.Current("单位编号")
        End If
        If Tables("销售订单").Focused  Then
            Tables("销售订单").Current("单位编号") = tbl.Current("单位编号")
        End If
        If Tables("采购退出").Focused  Then
            Tables("采购退出").Current("单位编号") = tbl.Current("单位编号")
        End If
        If Tables("销售退回").Focused  Then
            Tables("销售退回").Current("单位编号") = tbl.Current("单位编号")
        End If
        
        If e.Form.DropTable IsNot Nothing Then '如果是通过表下拉的
            e.Form.DropTable.FinishEditing()
        Else '如果是通过窗口下拉的
            e.Form.DropDownBox.WriteValue()
        End If
    End If
End If
测试结果是,单位编号不能自动录入求指教

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/17 10:04:00 [只看该作者]

直接判断e.Form.DropTable即可,如

 

Dim ct As Table = e.Form.DropTable

msgbox(ct.Name)

 


 回到顶部
帅哥哟,离线,有人找我吗?
cool314156
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:374 积分:3277 威望:0 精华:0 注册:2018/1/12 10:54:00
  发帖心情 Post By:2018/5/17 10:19:00 [只看该作者]

谢谢了


 回到顶部