以文本方式查看主题

-  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=119069)

--  作者:cool314156
--  发布时间: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
测试结果是,单位编号不能自动录入求指教

--  作者:有点甜
--  发布时间:2018/5/17 10:04:00
--  

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

 

Dim ct As Table = e.Form.DropTable

msgbox(ct.Name)

 


--  作者:cool314156
--  发布时间:2018/5/17 10:19:00
--  
谢谢了