Search Combo Error Help Needed!

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

I have a search combo list which is used to lookup customers on my form.
I want this error message NOT to appear if not in the list

The text you entered isn't an item in the list.
Select an item from the list,or enter text that matches one of the listed
items


I have my own message that I want to use

Thanks,

Dave
P.S. Here is the code for the lookup.
It is set to limit to list

After Update Event Code Below

Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[TimeID] = " & Str(Me![Combo202])
Me.Bookmark = rs.Bookmark
Me![Combo202] = Null
Me!Labelsearch.Visible = True
 
you need to add a VBA procedure to the combobox's NotInList event. for
information on how to use and control the event: open the form in design
view and click on the combo box to select it. in the Properties box, click
on the NotInList line (to place your blinking cursor there), and press F1.
this will take you to the topic in Access Help; in A2003, you may have to
click the AppliesTo link, choose Combobox Object, then click the Events link
and choose NotInList from the droplist.

if you've already read the Help topics, written the code, and are having
trouble with your code, then post your NotInList event code and explain what
problem is occurring.

hth
 
The Not in List Works, but the message still shows up;
It beeps and says The text you entered isnt an item in the list.
Select an item from the list, or enter text that matches one of the listed
items
__________________________________________________________________________________________
After Update Event Code Below

Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[TimeID] = " & Str(Me![Combo202])
Me.Bookmark = rs.Bookmark
Me![Combo202] = Null
Me!Labelsearch.Visible = True
_______________________________________________________________________________________________
On Not in List Code Below
MsgBox "Invalid Number, try Again"
_______________________________________________________________________________________________
On Lost Focus Code Below
Me![Combo202] = Null
Me!Labelsearch.Visible = True
_____________________________________________________________________________________________
tina said:
you need to add a VBA procedure to the combobox's NotInList event. for
information on how to use and control the event: open the form in design
view and click on the combo box to select it. in the Properties box, click
on the NotInList line (to place your blinking cursor there), and press F1.
this will take you to the topic in Access Help; in A2003, you may have to
click the AppliesTo link, choose Combobox Object, then click the Events
link
and choose NotInList from the droplist.

if you've already read the Help topics, written the code, and are having
trouble with your code, then post your NotInList event code and explain
what
problem is occurring.

hth


Dave Elliott said:
I have a search combo list which is used to lookup customers on my form.
I want this error message NOT to appear if not in the list

The text you entered isn't an item in the list.
Select an item from the list,or enter text that matches one of the listed
items


I have my own message that I want to use

Thanks,

Dave
P.S. Here is the code for the lookup.
It is set to limit to list

After Update Event Code Below

Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[TimeID] = " & Str(Me![Combo202])
Me.Bookmark = rs.Bookmark
Me![Combo202] = Null
Me!Labelsearch.Visible = True
 
On Not in List Code Below
MsgBox "Invalid Number, try Again"

the Help topic explains exactly how to stop the default message from showing
up, but i don't see that you've used or tried to use that code in your
NotInList event procedure. suggest you read the topic again, carefully, and
then post back if you have a question about what it's telling you.

hth


Dave Elliott said:
The Not in List Works, but the message still shows up;
It beeps and says The text you entered isnt an item in the list.
Select an item from the list, or enter text that matches one of the listed
items
____________________________________________________________________________
______________
After Update Event Code Below

Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[TimeID] = " & Str(Me![Combo202])
Me.Bookmark = rs.Bookmark
Me![Combo202] = Null
Me!Labelsearch.Visible = True
____________________________________________________________________________
___________________
On Not in List Code Below
MsgBox "Invalid Number, try Again"
____________________________________________________________________________
___________________
On Lost Focus Code Below
Me![Combo202] = Null
Me!Labelsearch.Visible = True
____________________________________________________________________________
_________________
tina said:
you need to add a VBA procedure to the combobox's NotInList event. for
information on how to use and control the event: open the form in design
view and click on the combo box to select it. in the Properties box, click
on the NotInList line (to place your blinking cursor there), and press F1.
this will take you to the topic in Access Help; in A2003, you may have to
click the AppliesTo link, choose Combobox Object, then click the Events
link
and choose NotInList from the droplist.

if you've already read the Help topics, written the code, and are having
trouble with your code, then post your NotInList event code and explain
what
problem is occurring.

hth


Dave Elliott said:
I have a search combo list which is used to lookup customers on my form.
I want this error message NOT to appear if not in the list

The text you entered isn't an item in the list.
Select an item from the list,or enter text that matches one of the listed
items


I have my own message that I want to use

Thanks,

Dave
P.S. Here is the code for the lookup.
It is set to limit to list

After Update Event Code Below

Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[TimeID] = " & Str(Me![Combo202])
Me.Bookmark = rs.Bookmark
Me![Combo202] = Null
Me!Labelsearch.Visible = True
 
Back
Top