There is a Teacher Table in Microsoft Access 2007. And i want to get all the names of the Teachers from the field Tch_name to a combo box list in VB6. Does a loop needs to be created? Can anyone help me out please.
Thanks
There is a Teacher Table in Microsoft Access 2007. And i want to get all the names of the Teachers from the field Tch_name to a combo box list in VB6. Does a loop needs to be created? Can anyone help me out please.
Thanks
dim db as new adodb.connection
'then open your database with db connection
dim r as new adodb.recordset
r.open "select Name from Teacher", db, adopendynamic, adlockoptimistic, adcmdtext
'I guess column name is Name
do while not r.eof
combo1.additem(r.fields(0))
r.movenext
loop