Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Turnoff Access's "Not in List" warning

Posted on 2003-11-30
10
Medium Priority
?
429 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 500 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

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…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

705 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