COMBO BOX DILEMNA

H

hdfixitup

I have a bound form that opens and displays all records. There is a subform
on the form as well. I have an unbound search box in the detail section of
form. I type a number in the field , press [Enter] and the cursor jumps to
the subform and displays the searched records. Duplicate numbers are allowed.
The underlying table is indexed on two fields so as not to allow duplicate
records. I have also placed a few fields [Competitive Line] & [Competitor]
in the detail section so I can view my records in Datasheet View as well.
I placed an unbound Combo Box [Comp] in the detail section wanting to filter
specific product lines. It looks up it text values in a table with one bound
field. I placed an expression on the AfterUpdate Event:
Me.Filter = "[Competitive Line] = """ & [Comp] & """"
Me.FilterOn = True

After I filter the line from the combo box selection, I am able to type in a
number from the filtered Competitive Line and all works well. But, when I
remove the filter and clear the combo box to null, I am NO longer able to
type in any number in the Search box and find that record. I get an error
message stating You can not go to the specified record. If I go to Datasheet
View after the filter is removed, All records are showing and I can filter on
a specific number, but not from my Search field on Form View as I could
before I added the combo box.

Any ideas would be greatly appreciated.
 
Top