How do I select the new item I just added to my combo box?

Phonesa

Registered User.
Local time
Today, 21:19
Joined
Jul 3, 2003
Messages
27
Right now, if a user enters an item not in my combo box, I open a form which lets them add the item to the box in the NotInList event. After I enter it though, I still have to manually go down and find the item in my combo box or else it keeps telling me that the item is not in the list! In a small list that won't be too much of a problem, but a couple of my combo boxes have quite a huge list!
 
from your second form after you complete the process of adding the new item, you will need to trigger a combo box requery on the first form, so possibly add a it to the end of the event that adds the new item or stick it in the unload event of form two.

Code:
form1![combo1].Requery
form1![combo1] = "New Item"
 
Last edited:
Thanks! Although I switched the order around and went:
Form!cbSectionCode = cbSectionCode.Text
Form!cbSectionCode.Requery

Because when I tried the Requery first, it kept telling me I had to save the field first. Maybe I was doing it wrong the other way though.
 

Users who are viewing this thread

Back
Top Bottom