我在combobox控件的TextChanged,写了以下代码,红色部分不起作用With Forms("新增单位").Controls("单位性质_ComboBox")
Dim cmb2 As WinForm.ComboBox
Dim cmb3 As WinForm.ComboBox
If .text = "事业" Then
cmb2 = Forms("新增单位").Controls("事业单位类型_ComboBox")
cmb2.ComboList = DataTables("基础数据表1").GetComboListString("事业单位类型")
cmb3 = Forms("新增单位").Controls("事业单位行业_ComboBox")
cmb3.ComboList = DataTables("基础数据表1").GetComboListString("事业单位行业")
Else
cmb2 = Forms("新增单位").Controls("事业单位类型_ComboBox")
cmb2.ComboList = Nothing
cmb2.text = Nothing
cmb3 = Forms("新增单位").Controls("事业单位行业_ComboBox")
cmb3.ComboList = Nothing
cmb3.text = Nothing
End If
End With
[此贴子已经被作者于2019/8/4 0:55:58编辑过]