Rusty
Registered User.
- Local time
- Today, 15:40
- Joined
- Apr 15, 2004
- Messages
- 207
Hello again people,
I am trying to code a NotInList event for a combo box on a form.
(The form is called "frmPROJECTS2" and the name of the combo box is "cboChiefID".
When the user tries to enter a value that is not on the list I want a message box to come up as follows:
"The name you have entered is not in the list. Would you like to add it?"
If the user clicks on "Yes" then I want to launch a form called "frmAddPerson"
If the user click on "No" then I want to clear the entry in the combobox
Any ideas? I've tried several different pieces of code but without any luck – I just get loads of error messages, and even when I do get "frmAddPerson" to launch and add the entry from there, I close the form to go back to "frmPROJECTS2" and I then get the cr@ppy default message "the text you entered isn't an item on the list…"
Is there a way of clearing the entry in the combobox and then launching the form called "frmAddPerson"?
====================================================
NB – I am doing it this way because the combo box list is a list of names and displays surname, forename and title, but returns a unique person id number. So it has about 12 different "Jones" or "Smith" listed in there but not necessarily "Bob Jones" or "Lee Smith", Therefore the frmAddPerson enables the user to enter these values in one go.
====================================================
Please help,
Rusty
I am trying to code a NotInList event for a combo box on a form.
(The form is called "frmPROJECTS2" and the name of the combo box is "cboChiefID".
When the user tries to enter a value that is not on the list I want a message box to come up as follows:
"The name you have entered is not in the list. Would you like to add it?"
If the user clicks on "Yes" then I want to launch a form called "frmAddPerson"
If the user click on "No" then I want to clear the entry in the combobox
Any ideas? I've tried several different pieces of code but without any luck – I just get loads of error messages, and even when I do get "frmAddPerson" to launch and add the entry from there, I close the form to go back to "frmPROJECTS2" and I then get the cr@ppy default message "the text you entered isn't an item on the list…"
Is there a way of clearing the entry in the combobox and then launching the form called "frmAddPerson"?
====================================================
NB – I am doing it this way because the combo box list is a list of names and displays surname, forename and title, but returns a unique person id number. So it has about 12 different "Jones" or "Smith" listed in there but not necessarily "Bob Jones" or "Lee Smith", Therefore the frmAddPerson enables the user to enter these values in one go.
====================================================
Please help,
Rusty
