>>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() >the eof() usage comes from code that i took over, i changed to using found() myself after talking to David Frankenbach and a few other here. the index is correct and since i put in the selects right before the seek and locate i assumed that the correct table was being used. i put in you code to check the file and index, the file was definately correct but i am having problems getting key() to return the correct value.