-- 作者:hongyefor
-- 发布时间:2016/7/28 17:53:00
-- 关于日期列的年份筛选
Dim cj As WinForm.ComboBox = e.Form.Controls("ComboBox1") Dim dm As WinForm.ComboBox = e.Form.Controls("ComboBox2") Dim hm As WinForm.ComboBox = e.Form.Controls("ComboBox3") If cj.SelectedItem IsNot Nothing Then If dm.SelectedItem IsNot Nothing Then If hm.SelectedItem IsNot Nothing Then e.sender.ComboList = DataTables("开票主表").GetComboListString(Year(开票日期) ,"客户名称 = \'"& cj.text &"\'and 发票代码 = \'"& dm.text &"\'and 发票号码 = \'"& hm.text &"\'","_identify") Else e.sender.ComboList = DataTables("开票主表").GetComboListString(Year(开票日期) ,"客户名称 = \'"& cj.text &"\'and 发票代码 = \'"& dm.text &"\'","_identify") End If Else If hm.SelectedItem IsNot Nothing Then e.sender.ComboList = DataTables("开票主表").GetComboListString(Year(开票日期) ,"客户名称 = \'"& cj.text &"\'and 发票号码 = \'"& hm.text &"\'","_identify") Else e.sender.ComboList = DataTables("开票主表").GetComboListString(Year(开票日期) ,"客户名称 = \'"& cj.text &"\'","_identify") End If End If Else If dm.SelectedItem IsNot Nothing Then If hm.SelectedItem IsNot Nothing Then e.sender.ComboList = DataTables("开票主表").GetComboListString(Year(开票日期) ," 发票代码 = \'"& dm.text &"\'and 发票号码 = \'"& hm.text &"\'","_identify") Else e.sender.ComboList = DataTables("开票主表").GetComboListString(Year(开票日期) ," 发票代码 = \'"& dm.text &"\'","_identify") End If Else If hm.SelectedItem IsNot Nothing Then e.sender.ComboList = DataTables("开票主表").GetComboListString(Year(开票日期) ," 发票号码 = \'"& dm.text &"\'","_identify") Else e.sender.ComboList = DataTables("开票主表").GetComboListString(Year(开票日期) ,"","_identify") End If End If End If
帮我改一下吧,Year(开票日期) 有问题,出现错误: 此主题相关图片如下:cw.jpg
|