Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding items to combo box

Status
Not open for further replies.

jennyek2000

Programmer
Sep 2, 2003
43
GB
Hi

I have a combo box whose items are the document sizes A0, A1, A1, A3, A4 and A5. These items were added to the box at design time (i.e. items collection)

The combo box is bound to a column in the database (Access) whose fields are also a drop down menu of A0, A1, A2, A3, A4 and A5, using the lookup wizard.

I want to be able to add the items that are in the database fields drop down list rather than add them at design time, so that if a size is added to the database, it will be reflected in the application.

Does anybody know how to do this??

Thanks,
Jenny
 
Hi Jenny
There are so many ways to do this but the best is to bind the combobox to the datatable like this
Dim MyTable as datatable
'You have to build the MyTable which can be built in different ways like with DATAADAPTER or stored procedures

'after building the MyTable
MyCombobox.DataSource=MyTable

Regards
Nouman

Nouman Zaheer
Software Engineer
MSR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top