以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]求助 老大 还是那天的组合下拉框的奇葩问题!  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=15307)

--  作者:gaoyong30000
--  发布时间:2011/12/20 11:28:00
--  [求助]求助 老大 还是那天的组合下拉框的奇葩问题!

项目里 现场检查表 —  绩效考核录入窗口

 

考核序号

考核内容

2个标签旁边的 2个组合框 enter事件里有2段这个代码

 

考核序号:

If Tables("现场检查").current.Isnull("岗位") = False Then
    If Tables("现场检查").current.isnull("考核内容") = True  Then
        e.sender.ComboList = dta.GetComboListString("序号",  "岗位 = \'" & Tables("现场检查").current("岗位") & "\' Or 岗位 = \'全部门\'")
    Else
        e.sender.ComboList = dta.GetComboListString("序号", "(岗位 = \'" & Tables("现场检查").current("岗位") & "\' Or 岗位 = \'全部门\')  and 考核内容 = \'" & Tables("现场检查").current("考核内容") & "\'")
    End If
Else
e.sender.combolist = ""
End If

 

考核内容:

If Tables("现场检查").current.Isnull("岗位") = False Then
    If Tables("现场检查").current.isnull("考核序号") = True  Then
        e.sender.ComboList = dta.GetComboListString("考核内容",  "岗位 = \'" & Tables("现场检查").current("岗位") & "\' Or 岗位 = \'全部门\'")
    Else
        e.sender.ComboList = dta.GetComboListString("考核内容", "(岗位 = \'" & Tables("现场检查").current("岗位") & "\' Or 岗位 = \'全部门\')  and 考核内容 = \'" & Tables("现场检查").current("考核内容") & "\'")
    End If
Else
e.sender.combolist = ""
End If

 

现在出现了问题 :

本来岗位无值的话   e.sender.combolist = ""  下拉框也应该无值

 

现在例如: 先选择了第5记录  考核序号下拉  是2.1  然后我选择第7条记录(岗位无值,其下拉也应该无值)  但是下拉出现了2.1

 

后来代码加了这段

messagebox.show("执行了")
e.sender.combolist = ""

 

发现 如果直接选择第7条记录,会提示执行了

 

而先选择第5条记录  下拉2.1后 再选择第7条记录 则不会出现 执行了 对话框 也就是e.sender.combolist = "" 没执行 

 

请问如何解决?
 

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:华泰erp内控系统20.rar

[此贴子已经被作者于2011-12-20 11:28:00编辑过]

--  作者:狐狸爸爸
--  发布时间:2011/12/20 11:44:00
--  

代码没有看出问题来,没有数据库如何打开你的文件啊?