如下命令,当”业务名称“和”机房名称“都有内容时,”光缆名称“的下拉菜单无法正常进行显示;问题是不是出在第二个IF。该怎么写才正确?
Dim l As WinForm.ComboBox = e.Form.Controls("业务名称")
Dim i As WinForm.ComboBox = e.Form.Controls("机房名称")
If l.Value > "" And i.Value = ""
e.Sender.ComboList = DataTables("光缆纤芯应用台帐表").GetComboListString("光缆名称","业务名称='" & l.Value & "'")
Else
If l.Value > "" And i.Value > ""
e.Sender.ComboList = DataTables("光缆纤芯应用台帐表").GetComboListString("光缆名称","业务名称='" & l.Value & "'" And "机房名称='" & i.Value & "'")
Else
If l.Value = "" And i.Value > ""
e.Sender.ComboList = DataTables("光缆纤芯应用台帐表").GetComboListString("光缆名称","机房名称='" & i.Value & "'")
Else
e.Sender.ComboList = DataTables("光缆纤芯应用台帐表").GetComboListString("光缆名称")
End If
End If
End If