类型:转载 责任编辑:asp.net 日期:2007/05/23
热门软件下载:
我做程序时现在碰到一个问题,在数据表中client中有客户公司和客户名两列数据,我用datacombo绑定客户公司。当我选择datacombo时,text文本控件自动显示相对应的公司,怎么做???
网友回答:
Private Sub Combo1_Click(Index As Integer)
Dim mrcc As ADODB.Recordset
Dim mrcd As ADODB.Recordset
Dim msgText As String
Dim intCount As Integer
Dim i As Integer
If Index = 1 Then
txtSQL = "select dm from dm_gf where mc = " & Trim(Combo1(1)) & ""
Set mrcc = ExecuteSQL(txtSQL, msgText)这是自己定的联接数据库的函数
If Not mrcc.EOF Then
txtItem(2) = mrcc.Fields(0)
End If
mrcc.Close
Endif
end sub
这是我以前做的,你参考一下