ClaraBarton
Registered User.
- Local time
- Yesterday, 17:08
- Joined
- Oct 14, 2019
- Messages
- 605
I apparently don't understand the NotInList function. I have several comboboxes so I made a separate module sub called EditCombo to carry out various actions for different kinds of combos and then return to the line "Me.cboPayee = null", etc. Everything works except when the code runs to the End Select it brings up "The text you entered isn't an item it the list. Do you want to edit it?" No. I don't. I'm finished. I don't want that message. I want the combo to requery with the new data and it doesn't. I've tried various things but I don't know how to get rid of it. What am I missing here?
Code:
Private Sub cboPayee_NotInList(NewData As String, Response As Integer)
Dim intAnswer As Integer
intAnswer = MsgBox("Add to the name list?", vbYesNo, "Missing Name")
Select Case intAnswer
Case vbYes
EditCombo Me, "cboPayee", "popNameInfo"
Me.cboPayee = Null
Me.cboPayee.Requery
Case vbNo
Response = acDataErrContinue
End Select
End Sub