Hello all 
I'm trying to figure out the best way to add a value that is not in a drop down combo list. After doing some searching online, I found this code:
So I put it in my 'not in list' event in properties on the combo box. I updated the code to match my table name 'tbltraits' and fieldname ' trait' but its not working. The combo box doesn't even trip the 'not in list' event when I type in a value that is not in the current list. ??
Am I close to making this approach work or is there a better way?
Appreciate any help!!

I'm trying to figure out the best way to add a value that is not in a drop down combo list. After doing some searching online, I found this code:
Code:
Private Sub Trait_NotInList(NewData As String, Response As Integer)
If MsgBox("The Item Entered is not in database, would you like to add it?", vbYesNo) = vbYes Then
CurrentDb.Execute " INSERT INTO tbltraits(trait) Select " & Chr(34) & NewData & Chr(34) & ";", dbFailOnError
Response = acDataErrAdded
End If
End Sub
Am I close to making this approach work or is there a better way?
Appreciate any help!!
