还是不行我两种都试了:
第一种:
Dim cmb As WinForm.ComboBox = e.form.Controls("精度")
cmb.ComboList = DataTables("基础表").GetComboListString("精度","精度 = 'Is Not Null '")
Dim cmb3 As WinForm.ComboBox = e.form.Controls("装夹难度")
cmb3.ComboList = DataTables("基础表").GetComboListString("装夹","装夹 = 'Is Not Null '")
Dim cmb1 As WinForm.ComboBox = e.form.Controls("钢性")
cmb1.ComboList = DataTables("基础表").GetComboListString("钢性","钢性 = 'Is Not Null '")
第二种:
Dim cmb As WinForm.ComboBox = e.form.Controls("精度")
cmb.ComboList = DataTables("基础表").GetComboListString("精度","精度 Is Not Null ")
Dim cmb3 As WinForm.ComboBox = e.form.Controls("装夹难度")
cmb3.ComboList = DataTables("基础表").GetComboListString("装夹","装夹 Is Not Null ")
Dim cmb1 As WinForm.ComboBox = e.form.Controls("钢性")
cmb1.ComboList = DataTables("基础表").GetComboListString("钢性","钢性 Is Not Null ")
你的问题有些让人摸不着头脑,GetComboListString本身就有排除空行功能的,怎么还会出现空值呢?
我这样也是过了,也是不行:
Dim cmb As WinForm.ComboBox = e.form.Controls("精度")
cmb.ComboList = DataTables("基础表").GetComboListString("精度")
Dim cmb3 As WinForm.ComboBox = e.form.Controls("装夹难度")
cmb3.ComboList = DataTables("基础表").GetComboListString("装夹 ")
Dim cmb1 As WinForm.ComboBox = e.form.Controls("钢性")
cmb1.ComboList = DataTables("基础表").GetComboListString("钢性")
我是用5楼代码的结果,好像3个代码都会一样的结果,请看图片:
此主题相关图片如下:打开窗口时报错图片.bmp
此主题相关图片如下:点确定能打开窗口,请看精度下拉项目.bmp