Hi happy programmers,
I have a combo box and a button right next to each other. The button opens a table (form) that is the rowsource of the combo box. I would like to update the combo box once I have added another record to the table source.
Here is an example;
Let's say I want to define or delete an entry from my combo box that shows all departments in my company.
1. Click on the button that brings the form for departments
2. Add or delete the department in the table
Here is what I don't know how to resolve.
3. Once I close the form of departments the combo box requeries the table and choose the first entry as default, so the first entry is already chosen.
I'm using Onfocus event to requery the combo box everytime it gets focus(of course) whether the table has been updated or not. I still can't figure out how to choose the first entry.
If anyone knows of a better or more elegant way to do this please let me know,
Thank you in advance,
V.
I have a combo box and a button right next to each other. The button opens a table (form) that is the rowsource of the combo box. I would like to update the combo box once I have added another record to the table source.
Here is an example;
Let's say I want to define or delete an entry from my combo box that shows all departments in my company.
1. Click on the button that brings the form for departments
2. Add or delete the department in the table
Here is what I don't know how to resolve.
3. Once I close the form of departments the combo box requeries the table and choose the first entry as default, so the first entry is already chosen.
I'm using Onfocus event to requery the combo box everytime it gets focus(of course) whether the table has been updated or not. I still can't figure out how to choose the first entry.
If anyone knows of a better or more elegant way to do this please let me know,
Thank you in advance,
V.