请老师帮助看一下,窗口控件复选组合框CheckedComboBox1的 TextChanged 代码,没有运行,是什么原因?
谢谢!
'1、判断并列窗口名称
Dim frm As object
For Each f As WinForm.Form In Forms
If f.Tablename = "main" AndAlso f.opened AndAlso f.FormStyle = 0 Then
Dim tab = f.panel.parent.parent
Dim p = tab.tabpages(tab.Selectedindex)
frm = Forms(p.controls(0).name)
Exit For
End If
Next
'2、清除与并列窗口名同名的数据表中指定编号的行且复选组合框勾选的列数据
If frm IsNot Nothing Then
If e.Form.Controls("CheckedComboBox1").text <> "" Then
Dim dr As DataRow
dr = DataTables(frm.Name).Find("编号 = '" & e.Form.Controls("ComboBox1").text & "'") ’与窗口同名数据表,指定编号所在的行
If dr IsNot Nothing Then '如果找到的话
Dim Names As String() = e.Form.Controls("CheckedComboBox1").text.split(",") ’复选组合框勾选的列名称(列表项为表的列名称)
For Each Name As String In Names
dr(Name) = "" ’清除指定行相应列数据
Next
End If
End If
End If
[此贴子已经被作者于2018/12/2 21:50:10编辑过]