Dim cmb As WinForm.ComboBox = e.Form.Controls("ComboBox2") Dim str = cmb.SelectedValue msgbox(str) Dim dr As DataRow = DataTables("通讯录").Find("客户供应商 = '" & str & "'") If dr IsNot Nothing Then e.Form.Controls("TextBox3").Value= dr("客户ID") e.Form.Controls("TextBox3").WriteValue 'e.Form.Controls("TextBox2").Value= dr("姓名") End If