I have a form with a combo box that holds Cities. The row source is a Select statement that finds all the unique values that have already been entered into that table.
I'm trying to eliminate misspellings (New York, New Yirk, NewYork), so I'd like to limit the field to list values, and use the Not In List event to trigger a popup. I've got some code to display the popup and take the Yes/No result, but I don't know what to do after that. How do I say "OK, save the data the user typed into the Control Source Field." Basically, I want it to ignore the Limit to List parameter at that point and just save the new data.
Here's the beginning of my code:
I'm trying to eliminate misspellings (New York, New Yirk, NewYork), so I'd like to limit the field to list values, and use the Not In List event to trigger a popup. I've got some code to display the popup and take the Yes/No result, but I don't know what to do after that. How do I say "OK, save the data the user typed into the Control Source Field." Basically, I want it to ignore the Limit to List parameter at that point and just save the new data.
Here's the beginning of my code:
PHP:
Private Sub City_NotInList(NewData As String, Response As Integer)
Dim strTmp As String
'Get confirmation that this is not just a spelling error.'
strTmp = "Add '" & NewData & "' as a new city?"
If MsgBox(strTmp, vbYesNo + vbDefaultButton2 + vbQuestion, "Not in list") = vbYes Then