John,
You can try using sql statement for displaying the result in ListBox.
ListBox.Init
cSearch = "??"
With This
.RowSourceType = 3 && Sql Statement
.RowSource = 'SELECT * FROM table1 WHERE ALLTRIM(UPPER(csearch)) $ ALLTRIM(UPPER(Name)) into cursor cur_temp'
EndWith
And for requery -
cSearch = "??"
Thisform.List1.RowSource = 'SELECT * FROM table1 WHERE ALLTRIM(UPPER(csearch)) $ ALLTRIM(UPPER(Name)) into cursor cur_temp'
ThisForm.List1.Requery()
Manoj
>I am using the following code to set a filter of a table which then display the results in a list box.
>
>SET FILTER TO ALLTRIM(UPPER(csearch)) $ ALLTRIM(UPPER(Name)) IN Customer
>
>If there is only one record that matches the filter it works ok but if there are more that one a wait window pops up saying Filter cleared and the list box goes grey.
>
>Any ideas.
>
>Also the above code is not rush more optimised is there a better way.
>
>John