By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,053 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,053 IT Pros & Developers. It's quick & easy.

How to modify Combobox during runtime

P: 4
Hello I would like to get some ideas on how to modify a Combobox during runtime and save the changes so next time the form is ran changes are available.

Here is the plan.
A form displays a combobox that get populated with several items.
Next to the combobox I will add three buttons: Add, Delete and Modify.

My idea is that the combobox will read a previously created file with the items of the list.
And each button will modify that same file in order to be abel to manipulate the combobox.

Do you have any ideas on what kind of db file i should use that gives me a simple solution?
Are there particular tips or tweaks I should know about?

Thanks. Hope to hear from you soon.
Oct 23 '08 #1
Share this Question
Share on Google+
2 Replies


smartchap
100+
P: 236
Dear
You can do this. In the add button write code for input of data and then write / append that data in the file. Clear data in combobox and refill it from data from the file (amended).
In delete button write code for deleting the itemnumber selected in the combo and modify the file and refill combo.
Similarly for Modify button write code for modifying the item selected (index may be used) and replace this with old data at that index. Then modify the file.
Oct 23 '08 #2

debasisdas
Expert 5K+
P: 8,127
that can be achieved by using a database. You can read and write to the combo at runtime and the changes are saved to the database.
Oct 23 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.