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("开piao主表").GetComboListString(Year(开piao日期) ,"客户名称 = '"& cj.text &"'and fa piao代码 = '"& dm.text &"'and fa piao号码 = '"& hm.text &"'","_identify")
Else
e.sender.ComboList = DataTables("开piao主表").GetComboListString(Year(开piao日期) ,"客户名称 = '"& cj.text &"'and fa piao代码 = '"& dm.text &"'","_identify")
End If
Else
If hm.SelectedItem IsNot Nothing Then
e.sender.ComboList = DataTables("开piao主表").GetComboListString(Year(开piao日期) ,"客户名称 = '"& cj.text &"'and fa piao号码 = '"& hm.text &"'","_identify")
Else
e.sender.ComboList = DataTables("开piao主表").GetComboListString(Year(开piao日期) ,"客户名称 = '"& cj.text &"'","_identify")
End If
End If
Else
If dm.SelectedItem IsNot Nothing Then
If hm.SelectedItem IsNot Nothing Then
e.sender.ComboList = DataTables("开piao主表").GetComboListString(Year(开piao日期) ," fa piao代码 = '"& dm.text &"'and fa piao号码 = '"& hm.text &"'","_identify")
Else
e.sender.ComboList = DataTables("开piao主表").GetComboListString(Year(开piao日期) ," fa piao代码 = '"& dm.text &"'","_identify")
End If
Else
If hm.SelectedItem IsNot Nothing Then
e.sender.ComboList = DataTables("开piao主表").GetComboListString(Year(开piao日期) ," fa piao号码 = '"& dm.text &"'","_identify")
Else
e.sender.ComboList = DataTables("开piao主表").GetComboListString(Year(开piao日期) ,"","_identify")
End If
End If
End If
帮我改一下吧,Year(开piao日期) 有问题,出现错误:
此主题相关图片如下:cw.jpg