by kiran (3 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 3rd November 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
simple way to access the database and adding to the listbox or combobox Controls
---------
function_name(ctl as control,fld as string,tbl as string)
rs.open "select " & fld & " from " & tbl & " order by " & fld & "", connection,cursortype, lock type
while rs.eof=false
ctl.additem rs(0)
rs.movenext
wend
In program
----------
call function_name(combobox1,"field1","table1")
call function_name(combobox2,"field2","table2")
'like thatb u can access whatever u want
No comments have been posted about simple way to access the database and adding to the listbox or combobox Controls. Why not be the first to post a comment about simple way to access the database and adding to the listbox or combobox Controls.