Combo Box Limit to List Problem

G

Guest

Hi,
I am having trouble with a Combo Box that displays records on screen for
whatever value the user enters. I have to have the Limit to List property set
to Yes as the Bound Column (ID) is not visible on the drop down list.
We are using Touch Screens so when the user tabs onto the combo box, they
start typing their required serial number and if they see it they hit
enter.(record displays)
If they enter a serial number that is not on the list and hit enter, an
error appears 'The text you entered isn't an item on the list'. Instead of
this error appearing, I wish to have a message box saying that "Serial Number
not on Database" and I wish to clear the combo.text so it is empty ready for
the next search.
Any help with this will be greatly appreciated as it is causing problems for
my Staff

Thanks

Neil
 
T

tina

try adding the following code to the control's NotInList event procedure, as

Response = acDataErrContinue
Me!NameOfComboBoxControl.Undo
MsgBox "Serial Number not on Database."

change "NameOfComboBoxControl" to the actual name of the combo box control,
of course. if you don't know how to create an event procedure, you can get
step-by-step instructions by going to
http://home.att.net/~california.db/instructions.html and clicking on the
link "Create a VBA event procedure".

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Combo Box - Limit to List 17
Combo Box Selections 3
Limit to List 1
Limit combo box to list or Null 1
Combo Box Problem 5
Combo Box Data Entry and Display 2
Update Combo Box 6
List Box or Combo Box Better? 2

Top