Private Sub Form_Load()
Adodc1.Visible = False
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\123.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False"
Adodc1.RecordSource = "select * from aaa"
Adodc1.Refresh If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Me.text1.Clear
Do While Not Adodc1.Recordset.EOF
If Not IsNull(Adodc1.Recordset("字段")) Then
Me.text1.AddItem (Adodc1.Recordset("字段"))
End If
Adodc1.Recordset.MoveNext
Loop
End If
End Sub
我是想让access里的某个字段,列出在Combobox的下拉菜单中,这样写总是出错帮我看看啊
Adodc1.Visible = False
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\123.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False"
Adodc1.RecordSource = "select * from aaa"
Adodc1.Refresh If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Me.text1.Clear
Do While Not Adodc1.Recordset.EOF
If Not IsNull(Adodc1.Recordset("字段")) Then
Me.text1.AddItem (Adodc1.Recordset("字段"))
End If
Adodc1.Recordset.MoveNext
Loop
End If
End Sub
我是想让access里的某个字段,列出在Combobox的下拉菜单中,这样写总是出错帮我看看啊
combobox.AddItem (Adodc1.Recordset("字段"))
End If