473,587 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Elegant way of handling combo box "Not in list" event?

Hello,

Is there any way to get rid of or replacing the error message that pops up
when you enter a combo box item that isn't in the list? I've tried using
the Not In List event, but there is still an Access error that is raised.
Any ideas?

Thanks!
Rick
Sep 15 '06 #1
2 8418
Rico wrote:
Hello,

Is there any way to get rid of or replacing the error message that pops up
when you enter a combo box item that isn't in the list? I've tried using
the Not In List event, but there is still an Access error that is raised.
Any ideas?

Thanks!
Rick
Setting Response to acDataErrContin ue or acDataErrAdded avoids the
default message. See NotInList Event in the help file.

For example,

Private Sub cbxJobNumber_No tInList(NewData As String, Response As
Integer)
MsgBox ("The Job Number you entered is not in the list. Please try
again.")
Response = acDataErrContin ue
cbxJobNumber.Un do
End Sub

James A. Fortune
CD********@Fort uneJames.com

Pittsburgh has more bridges than any other city in the world. --
http://www.thepittsburghchannel.com/...03/detail.html

Sep 15 '06 #2
Thanks James!

Rick

<CD********@For tuneJames.comwr ote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Rico wrote:
Hello,

Is there any way to get rid of or replacing the error message that pops
up
when you enter a combo box item that isn't in the list? I've tried
using
the Not In List event, but there is still an Access error that is
raised.
Any ideas?

Thanks!
Rick

Setting Response to acDataErrContin ue or acDataErrAdded avoids the
default message. See NotInList Event in the help file.

For example,

Private Sub cbxJobNumber_No tInList(NewData As String, Response As
Integer)
MsgBox ("The Job Number you entered is not in the list. Please try
again.")
Response = acDataErrContin ue
cbxJobNumber.Un do
End Sub

James A. Fortune
CD********@Fort uneJames.com

Pittsburgh has more bridges than any other city in the world. --
http://www.thepittsburghchannel.com/...03/detail.html

Sep 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2476
by: Todd | last post by:
My form contains a combo box and the "not in list" event is triggerred when the user enters a value that is not among the values listed in the combo box. I want the user to be able to add a new value (which is fairly easy to do) but here's the twist... The form that allows the user to enter the new value exists in a separate Access...
9
19463
by: Bob Alston | last post by:
I have a drop down combo box that gives the user to enter an item not in the list by adding it to the list. The list is a table. It works fine on Access2003 but fails on Access2002/XP. ON XP, it seems to work, shows the message that the entry has been added, then I get an Access error saying the item is not in the list. Here is my code: ...
5
6118
by: krwill | last post by:
I'm trying to automate a combo box to add a record to the source table if it's "Not In List". I've tried many different examples and none have worked. Combo Box Name = Combo24 Source Table Name = TblHandler Source Field Name = HandlerLoginID (key column = HandlerID which is an autonumber) Thanks
6
2706
by: Rotor | last post by:
Hello again, In Access 2k3, I need for the combo list to auto expand when the user tabs into the field, or click on the field. I saw that there is a DropDown command, is that correct? Just typed that in the field properties event onenter or onclick? Thanks you.
4
4897
by: belfallas | last post by:
Hi, ive got this problem with one of my databeses. My question is, how do i create a sort of a shopping list on access? Im doing a ficitional pizza shop, and what i want to do is to have an order form. In this form i would like to be able to select an item from the combo box and then after an item is selected another combo box appears, and...
26
4804
by: pouj | last post by:
Hey i need help with setting up this on ACCESS 2007 i need step by step i need a form... i select a name (drop list)...then gives me more choice (in next drop list) ....then when i select that choice give another list (drop list).. so for example i select canada, from list of contries, then i would get list of the provinces and then i...
1
3993
by: Jason Northampton | last post by:
Hello This is the first time I've used a discusion forum and up until now I have managed to use and or modify VB code from the various sites on the web, until now! This is a simple problem and I am trying to update a contact record with FirstName and LastName contained on a table TblContacts via a Combo Box using the Limit to List function to...
4
3109
by: mistyblu | last post by:
I wrote an Access97 application using VBA for a company many moons ago and they have approximately 20 users. All has been hunky dory for a long time but suddenly they have a combo box error on 3 of the pc's. The identical application works fine on the other 17 pc's. The O/S is Windows XP Pro service pack 2. There are several combo boxes on...
6
6727
by: vanlanjl | last post by:
I cannot get the not in list event to work right. On my form I have a combo box named "cboChargeCode" I have a table named "tblChargeCode" I would like it so when you enter a value into the cbohargeCOde that is not listed it will alert you and ask you if you would like to add such item. My code
0
7923
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7852
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.