Solved

Turnoff Access's "Not in List" warning

Posted on 2003-11-30
10
369 Views
Last Modified: 2006-11-17
I have setup the event for NotInList to my own Msgbox, but how do i make Access's warning about the "Text you entered in not an item in the list" to go away.  I tried to put in warnings = false before my msgbox and then true after ... but that did nothing.
0
Comment
Question by:tljprincess
10 Comments
 
LVL 1

Expert Comment

by:udir
ID: 9848645
Hi tljprincess
try to set (in the comboBox Properties)
the 'Limit To List' To 'No'.
Udir
0
 
LVL 10

Expert Comment

by:jobrienct
ID: 9848688
post your code where you disabled warnings pls.

John
0
 
LVL 28

Accepted Solution

by:
TextReport earned 125 total points
ID: 9848714
The NotInList event has a parameter of Response and by setting this in the procedure access will either

Taken from the Access 2000 help file

Response = acDataErrDisplay '(Default) Displays the default message to the user. You can use this when you don't want to allow the user to add a new value to the combo box list.

Response = acDataErrContinue 'Doesn't display the default message to the user. You can use this when you want to display a custom message to the user. For example, the event procedure could display a custom dialog box asking if the user wanted to save the new entry. If the response is Yes, the event procedure would add the new entry to the list and set the Response argument to acDataErrAdded. If the response is No, the event procedure would set the Response argument to acDataErrContinue.

Response = acDataErrAdded  'Doesn't display a message to the user but enables you to add the entry to the combo box list in the NotInList event procedure. After the entry is added, Microsoft Access updates the list by requerying the combo box. Microsoft Access then rechecks the string against the combo box list, and saves the value in the NewData argument in the field the combo box is bound to. If the string is not in the list, then Microsoft Access displays an error message.

Cheers, Andrew
0
 
LVL 8

Expert Comment

by:Benjamin_Luk
ID: 9849060
Change following code a little, and paste it under your Combo Event : [On Not in List]

Dim ctl As Control
Set ctl = Me!Combo5 'Change the name here
        Response = acDataErrContinue
        ctl.Undo


it will do it for you

Regards

Ben
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 2

Expert Comment

by:dom_cath
ID: 9854995
Hi there,

The correct command to control the setwarnings is:

docmd.setwarnings False

....Your code that you want to ignore warnings from.

docmd.setwarnings true

and NOT docmd.setwarnings=false or =true

Hope this helps.

Dom
0
 
LVL 9

Expert Comment

by:ornicar
ID: 10075451
----------------------------------------------------------------------------------------
This question has been abandoned and needs to be finalized.
 You can accept an answer, split the points, or get a refund (information at http:/help.jsp#hs5)
  If you need a moderator to help you, post a question at Community Support (http:/Community_Support/)

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

ornicar
Cleanup Volunteer

---------------------------------------------------------------------------------------------
0
 
LVL 39

Expert Comment

by:stevbe
ID: 10210098
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: TextReport {http:#9848714}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

stevbe
EE Cleanup Volunteer
0
 
LVL 2

Expert Comment

by:dom_cath
ID: 10212619
I think you should split them as my answer also works to halt the warnings.

Dom
0
 
LVL 39

Expert Comment

by:stevbe
ID: 10212746
set warnings has no effect on "not in list" messages.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Access 2010 ComboBox Requery Not Working 17 24
Access 2016 Merge Tables 8 29
Access MDB/PDF 21 32
DSum between dates 5 0
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now