I have a combobox in a form and a button.
I want to add values to the combobox upon a click.
For example:
In the combobox there are 1,2,3,4 values present. I want to add 5 upon a button click.
I am not sure how to do this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I like to use queries or tables as row sources.
In this case, I would just create a table with one column and set that as the row source for the combo box.
Now I can edit the data in the table at run-time as I like (delete some values, insert new values, copy values from other tables with a single query…) and when I’m done, I just call
Combo1.Requery.With this solution, the added values don’t disappear after closing and reopening the form (not even after closing and reopening Access!), because the values are stored in a table in the Access database.