vb combo1.text加载字段名怎么加了2遍,邦肋
代码如下DimCon1Asadodb.ConnectionDimrs1Asadodb.RecordsetSetCon1=Newadodb.ConnectionDimcon...
代码如下
Dim Con1 As adodb.Connection
Dim rs1 As adodb.Recordset
Set Con1 = New adodb.Connection
Dim conn1 As String
conn1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\jiasheng.mdb;Persist Security Info=False"
Con1.Open conn1
Set rs1 = New adodb.Recordset
'添加记录
rs1.Open "select * from shangpinname", conn1, 1, 3
Dim i As Integer
For i = 3 To rs1.Fields.Count - 1
Combo1.AddItem rs1.Fields(i).Name
Next i
Combo1.Text = Combo1.List(2)
问题补充:能加到combo1里面去,可是加上的字段名是2遍呀
谁给个明确点的解答
能加到combo1里面去,可是加上的字段名是2遍呀 展开
Dim Con1 As adodb.Connection
Dim rs1 As adodb.Recordset
Set Con1 = New adodb.Connection
Dim conn1 As String
conn1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\jiasheng.mdb;Persist Security Info=False"
Con1.Open conn1
Set rs1 = New adodb.Recordset
'添加记录
rs1.Open "select * from shangpinname", conn1, 1, 3
Dim i As Integer
For i = 3 To rs1.Fields.Count - 1
Combo1.AddItem rs1.Fields(i).Name
Next i
Combo1.Text = Combo1.List(2)
问题补充:能加到combo1里面去,可是加上的字段名是2遍呀
谁给个明确点的解答
能加到combo1里面去,可是加上的字段名是2遍呀 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询