Limit to List and using the On Not In List Event and error question.

r3df1sh

Registered User.
Local time
Yesterday, 19:20
Joined
Sep 8, 2004
Messages
16
I have a set of cascading combo boxes. This deals with the first one and using the limit to list and On Not In List Event.

When an item is entered into the field not in the list I am having it execute the below code. I receive the "Not in list error" when selecting yes in the below message. Can someone point me in the correct direction on making this MS error not appear?

Code:
Private Sub cbmfg_NotInList(NewData As String, Response As Integer)

DoCmd.SetWarnings False
Me.cbMfg = ""

Dim strMsg As String, strTitle As String
strMsg = "The Manufacturer you have entered is not found in the list. Would you like to add this manufacturer?"

strTitle = " Manufacturer Not Available In List."

If MsgBox(strMsg, vbQuestion + vbYesNo, strTitle) = vbYes Then

DoCmd.OpenForm "frmNewMfg"
DoCmd.GoToRecord , , acNewRec

Else
DoCmd.CancelEvent

End If

End Sub

Thanks in advance.
 
Last edited:
r3,

DoCmd.OpenForm "frmNewMfg"
DoCmd.GoToRecord , , acNewRec
response = acDataErrContinue <-- Add this

Wayne
 
Thanks WayneRyan that did the trick.
 

Users who are viewing this thread

Back
Top Bottom