以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]控件 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=113002) |
||||
-- 作者:xh2207 -- 发布时间:2018/1/6 16:42:00 -- [求助]控件 ![]() ![]()
|
||||
-- 作者:有点蓝 -- 发布时间:2018/1/6 16:55:00 -- 不需要全局变量,DropDownClosed事件 Dim dr As Row = Tables("调拨工程编号_Table1").Current If dr IsNot Nothing Then \'如果选择了值 Select Case e.Form.DropDownBox.Name Case "调出工程编号","调出工程名称" If Forms("调拨").Controls("调入工程编号").Value = dr("工程编号") Then msgbox("不能和调入工程编号相同") Return End If If e.Form.DropDownBox.Name = "调出工程编号" e.form.DropDownBox.Value = dr("工程编号") Forms("调拨").Controls("调出工程名称").Value = dr("工程名称") Else e.form.DropDownBox.Value = dr("工程名称") Forms("调拨").Controls("调出工程编号").Value = dr("工程编号") End If Case "调入工程编号","调入工程名称" If Forms("调拨").Controls("调出工程编号").Value = dr("工程编号") Then msgbox("不能和调出工程编号相同") Return End If If e.Form.DropDownBox.Name = "调入工程编号" e.form.DropDownBox.Value = dr("工程编号") Forms("调拨").Controls("调入工程名称").Value = dr("工程名称") Else e.form.DropDownBox.Value = dr("工程名称") Forms("调拨").Controls("调入工程编号").Value = dr("工程编号") End If End Select End If |