Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NotInList Event

Status
Not open for further replies.

buhgman33

Programmer
Jul 18, 2003
24
IL
I have set up a combo box that allows additions to the list. What is supposed to happen is that when a number is entered that is not on the list a Yes/No message box is to appear to confirm if they want to add a new number to the list. If they say yes then a form opens to allow them to enter the new contact information, and then continue. If they say no, they should go back to the form they were on and pick another number from the list (all of this is coded into the Not In List evenet of the combobox).
All this works, but I still get the standard Access message "The text you entered isn't and Item in the list. Select an item from the list, or enter text that matches one of the listed items."
Is there anyway to turn this message box off. It is redundant to the box that I have set up myself.
Any help woould be appreciated.
 
Hi buhgman33,

After the User has said Yes and added a new item, Requery your combo box and then set Response (passed to the NotInList routine) to acDataErrContinue to stop the message.

Enjoy,
Tony
 
How are ya buhgman33 . . . .

Apparently your not using the Response variable included in the NotInList event. Use it as follows:

If MsgBox("Add To List?") =vbYes then
Your Code To Add To ist
Response=acDataErrAdded
Else
'Return to ComboBox
Response=acDataErrContinue
End If

This should do it . . . . .

TheAceMan [wiggle]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top