Hi everybody, im using the following code which is set on Not In List event of a combo box.
I am getting an error message if the value does not match with the values entered in the combo box. "The Text You Entered Is Not Item in the List". Please tell me what how i can get rid of it?
Code:
Private Sub Combo32_NotInList(NewData As String, Response As Integer) Dim strMsg As String strMsg = "Value is not in list. Add it?" If MsgBox(strMsg, vbOKCancel) = vbOK Then DoCmd.OpenForm "Clients", , , , acAdd, acDialog, NewData If IsNull(DLookup("ClientID", "Clients", True)) Then MsgBox "You failed to add a Subcategory that matched what you entered. Please try again.", vbInformation Response = acDataErrContinue Else Response = acDataErrAdded End If Else Response = acDataErrDisplay End If End Sub
Comment