Hi 
I have programmed the Not In List Event and when it does not find the values it undo the list value and opens the relative for to add another item id and then it refreshes back the form.
Everything is working fine except I can't get rid of that message.
"the text you entered isn't an item in the list"
I tried setting DoCmd.SetWarnings False and On Error Resume Next stuff but none of the thing is preventing that message to appear. Any things I am missing...? My code for Not in list event looks like this
Dim strResponse As String
strResponse = MsgBox("The Consultant you are trying to enter is not present in the database." & _
"Click YES to input new Consultant", vbYesNo + vbCritical, "Consultant Not Found"
If strResponse = vbYes Then
Me.ConsId.Undo
DoCmd.OpenForm "FrmConsultants", acNormal, , , acFormAdd
Else
MsgBox (acDataErrDisplay)
End If
Cheers!
Aqif
I have programmed the Not In List Event and when it does not find the values it undo the list value and opens the relative for to add another item id and then it refreshes back the form.
Everything is working fine except I can't get rid of that message.
"the text you entered isn't an item in the list"
I tried setting DoCmd.SetWarnings False and On Error Resume Next stuff but none of the thing is preventing that message to appear. Any things I am missing...? My code for Not in list event looks like this
Dim strResponse As String
strResponse = MsgBox("The Consultant you are trying to enter is not present in the database." & _
"Click YES to input new Consultant", vbYesNo + vbCritical, "Consultant Not Found"
If strResponse = vbYes Then
Me.ConsId.Undo
DoCmd.OpenForm "FrmConsultants", acNormal, , , acFormAdd
Else
MsgBox (acDataErrDisplay)
End If
Cheers!
Aqif