I have 2 accdb files - one is the frontend form and the other the backend database
I have a combobox that needs to be populated with a field from the database. And after a new record is added, the combobox list needs to be refreshed/updated/requeryed with the new data that has been added to the table.
This is what i have already tried:
Dim db as dao.database
dim rs as dao.rs
set db=opendatabase("c:\project\db.accdb")
set rs=db.recordset("select distinct section from sectionTable", dbopensnapshot)
>>> the rs recordset now has 10 records
cbosection.recordsource=rs![section]
>>> when i click the dropdown there is just the 1st record
Please help with how to get the complete list populated
I have tried doing a "do while not rs.eof", which does populate the cbo, but unable to get a way to requery for new updated data.
Pls assist
I have a combobox that needs to be populated with a field from the database. And after a new record is added, the combobox list needs to be refreshed/updated/requeryed with the new data that has been added to the table.
This is what i have already tried:
Dim db as dao.database
dim rs as dao.rs
set db=opendatabase("c:\project\db.accdb")
set rs=db.recordset("select distinct section from sectionTable", dbopensnapshot)
>>> the rs recordset now has 10 records
cbosection.recordsource=rs![section]
>>> when i click the dropdown there is just the 1st record
Please help with how to get the complete list populated
I have tried doing a "do while not rs.eof", which does populate the cbo, but unable to get a way to requery for new updated data.
Pls assist