T
Tara
I have a combo box that I want users to be able to add values to. In the
NotInList event I have it set to ask the user if they want to add the Agency.
If they do, it opens up the frmAddAgency form. Everything works well so
far, but the standard NotInList error message still opens once frmAddAgency
opens. How do I stop it? I have the custom message in place, so I assumed
it wouldn't appear at all.
Here's the code:
Private Sub Agency_NotInList(NewData As String, Response As Integer)
If MsgBox("This Agency is not currently in the list. Would you like to
add this Agency?", vbYesNo + vbQuestion) = vbYes Then
DoCmd.OpenForm "frmAddAgencies"
Else
MsgBox ("Please enter a valid Agency from the drop down box.")
End If
End Sub
Thanks,
Tara
NotInList event I have it set to ask the user if they want to add the Agency.
If they do, it opens up the frmAddAgency form. Everything works well so
far, but the standard NotInList error message still opens once frmAddAgency
opens. How do I stop it? I have the custom message in place, so I assumed
it wouldn't appear at all.
Here's the code:
Private Sub Agency_NotInList(NewData As String, Response As Integer)
If MsgBox("This Agency is not currently in the list. Would you like to
add this Agency?", vbYesNo + vbQuestion) = vbYes Then
DoCmd.OpenForm "frmAddAgencies"
Else
MsgBox ("Please enter a valid Agency from the drop down box.")
End If
End Sub
Thanks,
Tara