>lclregno = UPPER(ALLTRIM(thisform.pgfpageframe1.page4.txtCma_regno.Value)) > >SELECT 0 >SELECT NWC > >WAIT WINDOW "reg is_" + lclregno + "_" > >IF lclregno <> "" > > WAIT WINDOW "regno variable is not blank" > > SELECT NWC > SEEK lclregno ORDER CMA_regno > > IF EOF() > WAIT WINDOW "try a locate first" > SELECT NWC > LOCATE FOR lclregno = UPPER(ALLTRIM(CMA_regno)) > IF FOUND() > WAIT WINDOW "locate found it" > ELSE > WAIT WINDOW "not found" > ENDIF >... >... >Before the real problem, is there a reason you use EOF() instead of !Found() ?
set order to CMA_regno =messagebox(dbf()) + " "+key()