销售订单表中有客户代码列和订单单号列,我想在下图订单单号的下拉列表中根据销售发货表选择的客户代码行显示相应的订单单号。下面代码不行,清帮我改改。
Dim cmb As WinForm.ComboBox
cmb = e.form.Controls("ComboBox1")
Dim dr As DataRow = DataTables("销售发货").DataRows("客户代码")
'Dim vs = DataTables("销售订单").getValues("订单单号", "[客户简称] = '" & e.rows("客户简称") & "'", "订单单号 desc")
Dim vs = DataTables("销售订单").getValues("订单单号", "[客户代码] = 'dr' ", "订单单号 desc")
Dim ls As new List(of String)
‘订单单号数量限定
For Each v As String In vs
If ls.count >= 50 Then Exit For
ls.add(v)
Next
e.form.Controls("ComboBox1").Combolist = String.Join("|", ls.ToArray)
此主题相关图片如下:snap1.jpg