by Praveen Mani Tripathi (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 23rd January 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)
How to Call Data in Combo box very Esealy.
API Declarations
Only Must a Combo1 and SQL server connection as cn.
Dim rst as new adodb.recordset
private sub form_load()
if rst.state <>0 then rst.close
rst.open "select usernm,userid from users order by usernm",adopendynamic,adlockoptimistic
if rst.recordcount >0 then
do until rst.eof
combo1.additem (Rst(0))
combo1.itemdata (rst(1))
rst.movenext
Loop
end if
End sub
If you are using this code then revert me back for next topics for freely.