Public cn As New ADODB.Connection
Dim strOpen as String
Dim rs As New ADODB.Recordset
strOpen = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDest
cn.Open strOpen 'open db connection object with connection string set above
rs.Open "Select * from tbluser", cn, adOpenKeyset, adLockOptimistic
Do While Not rs.EOF
cboUserID.AddItem (rs.Fields("user_id") & ", " & rs.Fields("last_name") & ", " & rs.Fields("first_name"))
rs.MoveNext
Loop
rs.Close
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
http://www.experts-exchange.com/Microsoft/Development/.NET/Visual_Studio_.NET_2005/Q_23038550.html