此主题相关图片如下:123.png
查询不同的单据类型,比如关于供应商的这个有好几种单据,现在查询已经做好了,现在要实现选择不同的单据,上一次筛选的供应商值自动清空,显示现在选择的单据的供应商值,这个条件应在下面哪块写,怎么写,请教一下
Enter代码
Dim leixing,khmc,ywdw,xm,bm,gys As String
leixing = e.Form.Controls("ComboBox1").Value
khmc = e.Form.Controls("客户名称").Value
gys = e.Form.Controls("供应商").Value
ywdw = e.Form.Controls("业务单位").Value
xm = e.Form.Controls("姓名").Value
bm = e.Form.Controls("部门").Value
If leixing = "零配件采购"AndAlso gys = "" Then
Dim sts As List(of String) = DataTables("采购总表").SQLGetValues("供应商")
e.Sender.Items.Clear
For Each st As String In sts
e.Sender.Items.Add(st)
Next
ElseIf leixing = "其它采购"AndAlso gys = "" Then
Dim sts As List(of String) = DataTables("其它采购总表").SQLGetValues("供应商")
e.Sender.Items.Clear
For Each st As String In sts
e.Sender.Items.Add(st)
Next
End If
SelectedIndexChanged代码
Tables("采购总表").filter="供应商='" & e.Sender.SelectedValue & " '"
Tables("其它采购总表").filter="供应商='" & e.Sender.SelectedValue & " '"