G
Guest
Does anyone know how to suppress the NotInList warning that appears after the
notinlist event is activated? I've tried both error handling and setwarning
false. Niether seem to work. Here is my code:
Private Sub Customer_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_Customer_NotInList
Dim CustText As String
DoCmd.SetWarnings False
If MsgBox("The Customer you have entered is not in the system. Would you
like to add them?", vbYesNo) = vbYes Then
CustText = Forms!newJobentry!Customer.Text
Me.Undo
DoCmd.OpenForm "addCustomer", , , , acFormAdd
Forms!Addcustomer![Customer] = CustText
Else
Me.Undo
End If
DoCmd.SetWarnings True
Exit_Customer_NotInList:
Exit Sub
Err_Customer_NotInList:
Resume Exit_Customer_NotInList
End Sub
Thanks for any help
Rico
notinlist event is activated? I've tried both error handling and setwarning
false. Niether seem to work. Here is my code:
Private Sub Customer_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_Customer_NotInList
Dim CustText As String
DoCmd.SetWarnings False
If MsgBox("The Customer you have entered is not in the system. Would you
like to add them?", vbYesNo) = vbYes Then
CustText = Forms!newJobentry!Customer.Text
Me.Undo
DoCmd.OpenForm "addCustomer", , , , acFormAdd
Forms!Addcustomer![Customer] = CustText
Else
Me.Undo
End If
DoCmd.SetWarnings True
Exit_Customer_NotInList:
Exit Sub
Err_Customer_NotInList:
Resume Exit_Customer_NotInList
End Sub
Thanks for any help
Rico