For example,searching for "The Burling - Huntor Store" would have to be typed in that exact way in order to find that record. Is there a way that i could just type in "The Bur" and it would find it?? I would also like to have all records to sort from "The Bur" so the user may easily select the row.
I hope I'm explaining this in a way that is understandable.
This is what I have now:
Código: Selecionar todos
procedure REC_FND
private REC2FIND, SAV_REC
* Save current position in database if search fails
*--------------------------------------------------
SAV_REC = recno()
set color to &GET_CLR
read
* Continue if escape wasn't pressed
*----------------------------------
if LASTKEY()#ESC_KEY
*--------------------------------
REC2FIND = space(40)
do DISP_MSG with 'Client (include punctuation): '
@row(),col() get REC2FIND
read
* Continue if the escape key was not pressed
*-------------------------------------------
if lastkey() # ESC_KEY
* Remove trailing spaces
*-----------------------
REC2FIND = upper(trim(REC2FIND))
* Get client index
*--------------------
set order to 7
* Search using the key
*---------------------
set exact off
seek REC2FIND
set exact on
* Return to the first index
*--------------------------
set order to 1
* If found, put the highlight bar on the record
*----------------------------------------------
if !eof()
do SCRL_TOS
* If not found, tell the user
*----------------------------
else
do DISP_MSG with [Client, ]+trim(REC2FIND)+[, not found. Press a key.]
inkey(0)
go SAV_REC
endif
endif
endif
return
* por Pablo César: Title was modified to keep same matter in different situations.



