Solved

How to exit from a not in list error

Posted on 2011-03-24
2
287 Views
Last Modified: 2012-05-11
I have a combo box into which the user types a id number. If the number is not found it displays an error message. (see code). However it will not let the user exit. the combo box drops down and you are forced to pick something from the list and then you can push the exit button. How do remedy this to let the person either enter a new number  or exit the form ?
Private Sub Combo17_NotInList(NewData As String, Response As Integer)
MsgBox "Record Not Found", vbOKOnly, "Oh Dear"
    Response = acDataErrContinue

Open in new window

0
Comment
Question by:Serena2345
[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
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 35207681
see this link

Use NotInList Event to Add a Record to Combo Box

http://support.microsoft.com/?kbid=197526


0
 

Author Closing Comment

by:Serena2345
ID: 35207745
Thanks Cappy
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…

735 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