SELECT 1 LOCATE FOR UPPER(NO)=UPPER(TRIM(THISFORM.TEXT1.VALUE)) .AND. UPPER(NAM)=UPPER(TRIM(THISFORM.TEXT9.VALUE)) IF !FOUND() SCATTER MEMVAR blank no=thisform.text1.value nam=thisform.text2.value desc=thisform.text3.value unit=thisform.text4.value total=thisform.text7.value min=thisform.text6.value *!* record pointer is at end of file after the above locate command if not !found() GATHER MEMVAR *!* gather memvar will generate an error "end of file cncountered" unless you append a record first. ELSE ... ENDIF