一个combobox1 一个TextBox16
combobox1 的事件:
ENTER: (这里正常)
Dim cmb As WinForm.ComboBox = e.Sender
cmb.ComboList = DataTables("客户主表").GetComboListString("简称", "分管人='" & _UserName & "'")
valuechanged:
Dim a As String
Dim cm As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim dr As DataRow
a = cm.SelectedItem
dr = DataTables("客户主表").Find("简称='" & a & "'")
MessageBox.show(a)
If dr IsNot Nothing Then
Dim s As WinForm.TextBox = e.Form.Controls("TextBox16")
s.Value = dr("客户ID")
End If
红色的代码部分去掉后 没反应,,,加上后 正常执行