I have a txt box that is limited to the look up list, I have other ones that I simply add the item and it is added to the list. What I want to do is when clicked open a pop up form and add the category to the new item. So far simple .......... however when I click on the txt box and open the pop up form the standard message 'XXX" is not in the list, etc. appears is there a way to suppress the message? I tried Set Warnings but it still appears. Below is what I tried by modifying the code to add to list:
Code:
Private Sub trbItem_NotInList(NewData As String, Response As Integer)
Dim i As Integer
Dim Msg As String
If NewData = "" Then Exit Sub
Msg = "'" & NewData & "' is not currently in the list." & vbCr & vbCr
Msg = Msg & "Do you want to add it?"
i = MsgBox(Msg, vbQuestion + vbYesNo, "Item & Category List...")
If i = vbYes Then
DoCmd.SetWarnings False
DoCmd.OpenForm "frmTransactionItems", acNormal, "", "", , acNormal
DoCmd.GoToRecord acForm, "frmTransactionItems", acLast
DoCmd.SetWarnings True
Else
Response = acDataErrContinue
End If
End Sub