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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress Not In List Message. 1

Status
Not open for further replies.

grnzbra

Programmer
Mar 12, 2002
1,273
US
I have a combo box that has Limit To List property set to "Yes"

The On Not In List event has the following code:

Private Sub COFID_NotInList(NewData As String, Response As Integer)
DoCmd.SetWarnings False
DoCmd.OpenForm "COF", , , , acFormAdd, , NewData
End Sub

The new form is for entering new info into the list. I would like to surpress the message,"The text you entered is not an item in the list". The SetWarnings False doesn't seem to work. How can I surpress that message?
 
Response = acDataErrAdded

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Where does that get added?
I tried it in both the OnNotInList event and the OnOpen event and it didn't stop the message.
 
Private Sub COFID_NotInList(NewData As String, Response As Integer)
DoCmd.OpenForm "COF", , , , acFormAdd, acDialog, NewData
Response = acDataErrAdded
End Sub

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top