QUOTE
Try to check the spelling of the table name in your database if it match the recordsource you type in the code.
Did you use DataGrid Control?
I think you want to retrieve the record in the database and put it on the combo box.
Let me give you a sample:
CODE
'on the references select the microsoft activex dataobject 2.1 library.
' Create a database using microsoft access and the Filename is category and create table and name it as tblCategory"
' add combobox control and name it as cboCategory
dim cn as new adodb.connection
dim rs as adodb.recordset
Private sub Form_Load()
cn.provider = "Microsoft.Jet.Oledb.4.0"
cn.open app.path & "\Category.mdb"
if cn.state = adstateopen then
set rs = new adodb.recordset
rs.open "Select * from tblCategory",cn,adopendynamic,adlockoptimistc
end if
End sub
Private sub cbocategory_Dropdown()
cbocategory.clear
rs.requery
do while not rs.eof
cbocategory.addtem rs![name of the fields]
rs.movenext
loop
end sub
This post has been edited by tope10: 26 Jul, 2008 - 01:26 AM