Member Avatar

Hie people,
How can I save the items Entered in Combo Box at runtime ?
So that next time i use Drop Down the entered Item is Present in it.


Re: Saving Combo Box Data 80 80

I guess it depends on the design and the options available.
If you've got a db as part of your project you can use it to store the options (or select what values had been previously saved it a field with a select distinct).
If you don't have a db, you can use a list in My.settings and use that to save the possible options or a flat file or an XML file or whatever you are comfortable with.

Share more info, perhaps the code that you use to populate the combobox and possibly how you want this to work out.

Re: Saving Combo Box Data 80 80

try using this:

INSERT INTO 'database'.'tablename' (fieldname') VALUES ('" & ComboBox1.items(0) & "'), ('" & ComboBox1.items(1) & "'), ('" & ComboBox1.items(2) & "')

(0) here specifies the idex of your control. in specifying your database and table do not use single quote instead, use the symbol on your keyboard leftside of 1&! key but not this (~). I hope it helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.