I currently have the combobox move the user to a form to enter a new contact if the users information is not in the lookup table. I use the OnNotInList Event listed below.
What I would like to do is have the information AUTOMATICALLY entered so the user does not have to go to a separate form to enter a new contact
Private Sub Carrier_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_Carrier_NotInList
Dim intAnswer As Integer
intAnswer = MsgBox("That Insurance Carrier is not Listed in the Lookup List. Please add it to the List, then Select it from the Drop Down List", vbYesNo, vbQuestion)
If intAnswer = vbYes Then
DoCmd.RunCommand acCmdUndo
DoCmd.OpenForm "Insurance Lookup", acNormal, , , acFormEdit, acDialog
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
Exit_Carrier_NotInList:
Exit Sub
Err_Carrier_NotInList:
MsgBox Err.Description
Resume Exit_Carrier_NotInList
End Sub
What I would like to do is have the information AUTOMATICALLY entered so the user does not have to go to a separate form to enter a new contact
Private Sub Carrier_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_Carrier_NotInList
Dim intAnswer As Integer
intAnswer = MsgBox("That Insurance Carrier is not Listed in the Lookup List. Please add it to the List, then Select it from the Drop Down List", vbYesNo, vbQuestion)
If intAnswer = vbYes Then
DoCmd.RunCommand acCmdUndo
DoCmd.OpenForm "Insurance Lookup", acNormal, , , acFormEdit, acDialog
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
Exit_Carrier_NotInList:
Exit Sub
Err_Carrier_NotInList:
MsgBox Err.Description
Resume Exit_Carrier_NotInList
End Sub