>We are having a form in which we are using list box to show the customer No and Name (we call this list box if the user doesn't know customer no as a help and will be shown only if user clicks the help button next to customer No. text box)
>
>Now there are around 15000 records is customer master. Customer Master is having 56 fields. Now we want to filter out certain customer who are marked by a field call TV_OUT or CTA_OUT. So if any of these fields are not empty then this customer should not be displayed in the help listbox. We have used listbox wizard to have custno and name from customer master into listbox.
>
>We are using free tables in our project. If we filter the customer table then listbox display will be very late after we click help button.
>
>How can we make it fast ? Pl. Help
>
>Thankx in Advance.
>
>Reagrds
>
>Ashish Patel
Ashish,
Use SQL as rowsourcetype.
with this
.RowsourceType=3
.Rowsource = 'select CustName, CustNo '+;
' from Master '+;
' where !(TV_OUT == "" and CTA_OUT == "") '+;
' into cursor crsListMaster'
.ColumnCount = 2
.BoundColumn = 2
.ColumnWidths = '100,50'
.Controlsource = 'mytable.custno'
endwith
PS: empty() is not optimizable.
Cetin