I have a drop down box on my form that searches for a name in the database and brings up the selected name. If the name is not in the list, I get the standard microsoft dialogue box: The text you entered isn't in the list, select an item from the list....etc. However, I don't want that box, I want a message box that says "The text isn't in the list, press the ok button to create a new entry (at this point I want the form to open in add mode) or Cancel.
I don't want them to be able to add a new customer until they've checked whether there is an existing customer first.
the trick to using the not in list function is to let the combo box know that the data was added. when you open a not in list event you should see something like this
Private Sub ComboBox_NotInList(NewData As String, Response As Integer)
i add a function which opens an input form and returns whether the user added a new record or clicked cancel.
Response is the variable the combo box uses to see if the data was added. provided the user did add a new record set response to acDataErrAdded. Access will then requery the combo box.