lostandfound
Junior Poster in Training
51 posts since Jan 2008
Reputation Points: 20
Solved Threads: 1
try this code :
Private Sub Form_Load()
Dim RS As ADODB.Recordset
Dim Conn As ADODB.Connection
Dim Comm As ADODB.Command
Dim str As String
Set Conn = New ADODB.Connection
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = D:\Only Me\Authors.mdb"
Conn.Open
Set Comm = New ADODB.Command
Set Comm.ActiveConnection = Conn
Comm.CommandText = "SELECT Au_ID FROM Authors"
Comm.CommandType = adCmdText
Set RS = Comm.Execute
Do Until RS.EOF = True
Combo1.AddItem RS!Au_ID
RS.MoveNext
Loop
Set RS = Nothing
Set Comm = Nothing
Set Conn = Nothing
End Sub
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
Thanks JX_MAN, I will take that as a compliment. I wonder how many of those solved threads of yours are down to blatantly copying other members replies.
Whereas copying obviously works for some , others benefit from doing a little bit of thinking themselves!!
Hope the code helps with your problem Pranavdv.
Getting to grips with the ADO control is hard work but is a great tool once you get rolling.
Cheers for now
lostandfound
Junior Poster in Training
51 posts since Jan 2008
Reputation Points: 20
Solved Threads: 1
??
hmm...sorry if this code some like yours...
well, i have a book for this.
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444