Update combo box with newly added value in another form

scheeps

Registered User.
Local time
Today, 21:17
Joined
Mar 10, 2011
Messages
82
I've got a form with a bound combo box "Contacts". If the contact does not exist the user would like to select, he double clicks the combo box and a modal form appear where the non existent contact can be entered.

How can the newly added contact be "active" in the combo box as soon as the modal form is being closed without the user need to reselect the added contact?

I need to display the saved record and not just the name surname string that was added. And the contacts table has a autonumber set on the primary key.
 
You should look into the NotInList event for this purpose. It is what it was designed for.
 
Thanks, but I did have a look at the NotInList event now and I see how this can be used.

But in my case the user will be prompted with a Add Contact form to add quite a bit of detail (address, tel no., e-mail etc. which is saved to the Contacts table); I would like to Name Surname fields to be visible in the combo box as soon as the user saves and closes the form.

Any other ideas?
 
You set the visible column in the Columns property of the cbo and the "AddedToList" value can be selected automatically when you return from the adding form.
 
In such case, you should look i na bit more detail at the NotInList event, as RG advised.
 

Users who are viewing this thread

Back
Top Bottom