Hi Vinod, I 've using this code for a long time:
Note: List1.REcordsource is a table.
In the Text1.InteractiveChange() type this:
LOCAL cVal, cLen, c1st, c2nd, c3rd, n1st, n2nd, n3rd, nTop, nEnd, ;
nMax, oList
oList = THISFORM.List1
* 1st = 1 to n2nd-1
nMax = oList.LISTCOUNT
IF nMax <= 10
cVal = ALLTRIM(UPPER(This.Value))
nTop = 1
nEnd = nMax
ELSE
n1st = INT(nMax * .25) && 1er. Cuarto
n2nd = INT(nMax * .50) && 2do Cuarto
n3rd = INT(nMax * .75) && 3er Cuarto
c1st = UPPER(oList.LISTITEM[n1st])
c2nd = UPPER(oList.LISTITEM[n2nd])
c3rd = UPPER(oList.LISTITEM[n3rd])
cVal = ALLTRIM(UPPER(THIS.VALUE))
cLen = LEN(cVal)
DO CASE
CASE cVal <= LEFT(c1st,cLen)
nTop = 1
nEnd = n1st
CASE cVal <= LEFT(c2nd,cLen)
nTop = n1st + 1
nEnd = n2nd
CASE cVal <= LEFT(c3rd,cLen)
nTop = n2nd + 1
nEnd = n3rd
OTHERWISE
nTop = n3rd + 1
nEnd = nMax
ENDCASE
ENDIF
FOR nIndex = nTop TO nEnd && Searh each items
IF UPPER(ALLTRIM(oList.LISTITEM[nIndex])) = cVal
oList.LISTINDEX = nIndex
EXIT
ENDIF
ENDFOR
oList.REFRESH
Dominican Republic, a Paradise in America