我需要在当前窗口的COMBOBOX下拉取另一个表的其他字段到当前窗口,,,
此主题相关图片如下:qq截图20120805225255.png
错误提示如下:
此主题相关图片如下:qq截图20120805225837.png
在selectedindexchanged 事件中的代码如下:
Dim s As Row=Tables("业务").Current
Dim skr As WinForm.ComboBox = e.Form.Controls("cb_收款人")'收款人
Dim zh As WinForm.TextBox = e.Form.Controls("tb_收款人账户")'收款人账号
Dim sf As WinForm.TextBox = e.Form.Controls("tb_收款人省")'省份
Dim ds As WinForm.TextBox = e.Form.Controls("tb_收款人市")'所在市
Dim skh As WinForm.TextBox = e.Form.Controls("tb_收款人行名")'收款行
Dim dr As DataRow = skr.SelectedItem
If dr IsNot Nothing Then
zh.Value =dr("银行账号")
sf.Value=dr("省")
ds.Value=dr("市")
skh.value=dr("开户行名称")
End If
------------------------------
enter 事件:
Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = "SELECT DISTINCT 单位名称 From {客户资料}"
dt = cmd.ExecuteReader()
e.Sender.ComboList= dt.GetComboListString("单位名称")
-----------------------------------
当前窗口绑定的表是"业务",,
请问代码应该如何更改???