Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
在客户表有两个列表框,cmb1 cmb2 分别绑定到员工表的部门列和员工列.如何做到,cmb2的列表项目,只显示cmd1所属部门的员工呢?
在cmb2的Enter事件中加入代码:
Dim cmb1 As WinForm.ComboBox = Forms("窗口1").Controls("cmb1")
Dim cmb2 As WinForm.ComboBox = Forms("窗口1").Controls("cmb2")
cmb2.ComboList = DataTables("员工").GetComboListString("姓名","部门 = '" & cmb1.value & "'" )
不行哦,我的代码是,您帮我看看
Dim cmb1 As WinForm.ComboBox = e.Form.Controls("cmb1")
Dim cmb2 As WinForm.ComboBox = e.Form.Controls("cmb2")
cmb2.ComboList = DataTables("业务员表").GetComboListString("业务员","隶属部门 = '" & cmb1.value & "'" )