Solved

Turnoff Access's "Not in List" warning

Posted on 2003-11-30
10
396 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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
 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

813 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

17 Experts available now in Live!

Get 1:1 Help Now