Previous Thread

6/29/2006 8:30:01 PM    Combo Box Limit to List Problem
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



6/30/2006 3:43:06 AM    Re: Combo Box Limit to List Problem
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 
 
"neshev" <neshev@discussions.microsoft.com> wrote in message 
 
news:085600A3-4DF8-48DD-BC8C-9C495E64B688@microsoft.com... 
 
set 
 
Number 
 
for 
 
for