ThisForm.Text1.Format='K' thisform.text1.Value=IIF(VARTYPE(this.value)="C",val(this.value),This.Value) SELECT 5 *ZAP DELETE all IF USED('mstr') SELECT mstr ELSE SELECT 0 USE mstr AGAIN ENDIF inyearofbill=thisform.text22.value inyearofbill=2000+VAL(RIGHT(ALLTRIM(STR(thisform.text22.Value)),2)) LOCATE FOR billno=thisform.text1.Value AND YEAR(mstr.datein)= inyearofbill IF ! FOUND() =MESSAGEBOX("agagaegaerr") else SET FILTER to billno=thisform.text1.value and YEAR(mstr.datein)= inyearofbill THISFORM.TEXT1.VALUE=BILLNO THISFORM.TEXT2.VALUE=DATEIN THISFORM.TEXT3.VALUE=NAM1 THISFORM.TEXT4.VALUE=INNAME THISFORM.TEXT5.VALUE=TYPE1 THISFORM.TEXT6.VALUE=INNOUMBER THISFORM.TEXT7.VALUE=PRICE THISFORM.TEXT8.VALUE=TOTAL THISFORM.TEXT10.VALUE=SALE sum total to thisform.text13.value GO BOTTOM thisform.text27.value=DIS SUM NET TO thisform.text28.value ****************************************** select 1 USE MSTR EXCL LOCATE FOR BILLNO=THISFORM.TEXT1.VALUE and YEAR(mstr.datein)= inyearofbill if found() SET FILTER TO BILLNO=THISFORM.TEXT1.VALUE and YEAR(mstr.datein)= inyearofbill SELECT 5 USE TEMP EXCL Append From Dbf('MSTR') FOR BILLNO=THISFORM.TEXT1.VALUE and YEAR(mstr.datein)= inyearofbill GO TOP With thisform.grid1 .recordsource = '' Select temp .recordsource = 'temp' thisform.list1.SetFocus thisform.refresh endwith else =messagebox("ÇáÝÇÊæÑÉ ÛíÑ ãæÌæÏÉ") thisform.text3.value=space(10) thisform.text4.value=space(10) thisform.text5.value=space(10) thisform.text6.value=0 thisform.text7.value=0 thisform.text8.value=0 thisform.text10.value=0 ENDIF ENDIF SELECT 1I assume you're entering your keystrokes in the listbox? If so, remember that the incremental search happens starting at the location where your selection is. So, when you start up, your selection is '1'. If you then type a '1', your selection will jump down to the next '1', which is the first digit in the '10'. If you then type a '2', it won't jump backwards up the the '2', it will jump forward to the '20'.
TEXTBOX::GotFocus>>>